The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #14 Jan 11 2021 10:08:37

%S 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,

%T 38,55,49,69,62,88,78,109,97,135,122,167,150,205,186,251,227,306,277,

%U 371,337,448,407,539,492,647,591,773,707,922,845,1096,1005,1298,1193,1535,1412,1809,1667,2127

%N Number of partitions of n into an even number of primes.

%H Vaclav Kotesovec, <a href="/A184198/b184198.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = (A000607(n)+A048165(n))/2.

%e 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.

%e The remaining A184199(18)=8 are odd.

%t 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 *)

%o (PARI)

%o parts(n, pred, y)={prod(k=1, n, if(pred(k), 1/(1-y*x^k) + O(x*x^n), 1))}

%o {my(n=80); Vec(parts(n, isprime, 1) + parts(n, isprime, -1))/2} \\ _Andrew Howroyd_, Dec 28 2017

%Y Cf. A000607, A048165, A184199, A184171.

%K nonn,easy

%O 0,9

%A _R. J. Mathar_, Jan 10 2011

%E a(31)-a(69) corrected by _Andrew Howroyd_, Dec 28 2017

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 May 13 03:04 EDT 2024. Contains 372497 sequences. (Running on oeis4.)