[seqfan] Re: checking A179385 (parts equal to 1 in restricted partitions of n)
Douglas McNeil
mcneil at hku.hk
Wed Jul 14 16:55:25 CEST 2010
On Wed, Jul 14, 2010 at 10:09 PM, Richard Mathar
<mathar at strw.leidenuniv.nl> wrote:
>
> I am unable to reproduce http://oeis.org/classic/A179385
> (count of parts equal to 1 in all partitions of n, all parts
> either 1 or prime, and no repeated prime in any partition)
> but get instead
> 1, 2, 4, 7, 10, 15, 20, 27, 35, 44, 55, 67, 81, 97, 115, 135, 158, 183, 212,
> 244, 280, 320, 364, 413, 467, 526, 591, 661, 737, 820, 909, 1007, 1112,
> 1226, 1349
>
> Can someone confirm/check this modification?
I agree-- assuming I understand the sequence description correctly,
that is (I read it as you do.)
# sage code
a = []
for n in IntegerRange(1, 50):
parts = [1] + list(primes(n+1))
ones_count = 0
for part in Partitions(n, parts_in=parts):
part = list(part)
if all((x==1) or (is_prime(x) and part.count(x) == 1) for x in part):
ones_count += part.count(1)
a += [ones_count]
sage: a
[1, 2, 4, 7, 10, 15, 20, 27, 35, 44, 55, 67, 81, 97, 115, 135, 158,
183, 212, 244, 280, 320, 364, 413, 467, 526, 591, 661, 737, 820, 909,
1007, 1112, 1226, 1349, 1481, 1624, 1778, 1943, 2121, 2311, 2515,
2734, 2968, 3219, 3486, 3771, 4075, 4399]
Doug
--
Department of Earth Sciences
University of Hong Kong
More information about the SeqFan
mailing list