login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A184198 Number of partitions of n into an even number of primes. 11
1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 2, 4, 4, 6, 5, 8, 7, 11, 10, 15, 13, 20, 17, 26, 23, 34, 29, 43, 38, 55, 49, 69, 62, 88, 78, 109, 97, 135, 122, 167, 150, 205, 186, 251, 227, 306, 277, 371, 337, 448, 407, 539, 492, 647, 591, 773, 707, 922, 845, 1096, 1005, 1298, 1193, 1535, 1412, 1809, 1667, 2127 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,9
LINKS
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)=11 are even, namely 11+7, 13+5, 5+5+5+3, 7+5+3+3, 3+3+3+3+3+3, 7+7+2+2, 11+3+2+2, 5+3+3+3+2+2, 5+5+2+2+2+2, 7+3+2+2+2+2, 3+3+2+2+2+2+2+2.
The remaining A184199(18)=8 are odd.
MATHEMATICA
Table[Count[IntegerPartitions[n], _?(AllTrue[#, PrimeQ]&&EvenQ[Length[ #]]&)], {n, 0, 70}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 16 2018 *)
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) + parts(n, isprime, -1))/2} \\ Andrew Howroyd, Dec 28 2017
CROSSREFS
Sequence in context: A165419 A117660 A358015 * A238998 A355359 A144369
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Jan 10 2011
EXTENSIONS
a(31)-a(69) corrected by Andrew Howroyd, Dec 28 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 11:23 EDT 2024. Contains 372049 sequences. (Running on oeis4.)