# [seqfan] Re: checking A179385 (parts equal to 1 in restricted partitions of n)

Christopher Gribble chris.eveswell at virgin.net
Wed Jul 14 19:30:42 CEST 2010

```Agree that a(11) = 55; calculated by hand.

Chris Gribble

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu]
On Behalf Of Richard Mathar
Sent: 14 July 2010 3:10 PM
To: seqfan at seqfan.eu
Cc: joseph_foley at btinternet.com
Subject: [seqfan] checking A179385 (parts equal to 1 in restricted
partitions of n)

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?

A179385 := proc(n)
local p,a ;
ps := combinat[partition](n) ;
# the number to be returned
a := 0 ;
# loop over all possible partitions of n
for  p in ps do
# set of all the primes seen so far in the partition
pbag := {} ;
# flag to indicate that this is a valid partition
wrks := true ;
# loop over the parts in that partition
for c in p do
# reject partition with composites
if c >1 and not isprime(c) then
wrks := false;
end if;
# reject partition with repeated primes
if c >1 and c in pbag then
wrks := false;
end if;
# put the 1s and primes into the bag to remember
pbag := pbag union {c} ;
end do:
# that's an allowed parition: add all its 1's to the result
if wrks then
for c in p do
if c =1 then
a := a+1 ;
end if;
end do:
end if;
end do:
a ;
end proc:
seq(A179385(n),n=1..35) ;

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

```