login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A184199
Number of partitions of n into an odd number of primes.
11
0, 0, 1, 1, 0, 1, 1, 2, 1, 2, 2, 4, 3, 5, 4, 7, 6, 10, 8, 13, 11, 17, 15, 23, 20, 29, 26, 38, 34, 49, 43, 62, 55, 78, 69, 97, 88, 122, 109, 150, 135, 186, 167, 227, 205, 277, 251, 337, 306, 407, 371, 492, 448, 591, 539, 707, 647, 845, 773, 1005, 922, 1193, 1096, 1412, 1298, 1667, 1535, 1963, 1809, 2305, 2127
OFFSET
0,8
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..200 from Jean-François Alcover)
FORMULA
a(n) = (A000607(n)-A048165(n))/2.
EXAMPLE
n=18 can be partitioned in A000607(18)=19 ways into primes, of which a(18)=8 are odd, namely 11+5+2, 13+3+2, 5+5+3+3+2, 7+3+3+3+2, 7+5+2+2+2, 3+3+3+3+2+2+2, 5+3+2+2+2+2+2, 2+2+2+2+2+2+2+2+2.
The remaining A184198(18)=11 are even.
MATHEMATICA
a[n_] := a[n] = Count[IntegerPartitions[n, All, Prime[Range[PrimePi[n]]]], p_ /; OddQ[Length[p]]];
Reap[Do[Print[n, " ", a[n]]; Sow[a[n]], {n, 0, 200}]][[2, 1]] (* Jean-François Alcover, Feb 13 2020 *)
PROG
(PARI)
parts(n, pred, y)={prod(k=1, n, if(pred(k), 1/(1-y*x^k) + O(x*x^n), 1))}
{my(n=80); (Vec(parts(n, isprime, 1)) - Vec(parts(n, isprime, -1)))/2} \\ Andrew Howroyd, Dec 28 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Jan 10 2011
EXTENSIONS
a(31)-a(70) corrected by Andrew Howroyd, Dec 28 2017
STATUS
approved