|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
LINKS
|
|
|
FORMULA
|
|
|
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]]];
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|