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!)
A085755 Number of partitions of n into a prime number of prime parts. 12

%I #16 May 26 2021 22:32:24

%S 1,1,2,2,2,3,4,3,4,5,6,8,8,9,9,12,12,16,16,19,19,26,24,31,29,39,35,50,

%T 44,61,55,74,67,93,80,111,99,136,119,166,145,197,179,239,213,292,255,

%U 342,310,409,365,492,436,577,524,682,614,814,724,947,865,1113,1007,1314

%N Number of partitions of n into a prime number of prime parts.

%H Alois P. Heinz, <a href="/A085755/b085755.txt">Table of n, a(n) for n = 4..1000</a>

%e a(20) = 12 because there are 12 partitions of 20 into a prime number of prime parts: 2+3+3+3+3+3+3 = 2+2+2+3+3+3+5 = 2+2+2+2+2+5+5 = 2+2+2+2+2+3+7 = 2+3+5+5+5 = 2+3+3+5+7 = 2+2+2+7+7 = 2+2+2+3+11 = 2+7+11 = 2+5+13 = 7+13 = 3+17.

%p b:= proc(n, i, t) if n<0 then 0 elif n=0 then `if`(isprime(t), 1, 0) elif i=1 then `if`(irem(n,2)=0 and isprime(t +n/2), 1, 0) else b(n,i,t):= b(n -ithprime(i), i, t+1) +b(n, i-1, t) fi end: a:= proc(n) local i; for i while ithprime(i)<n do od; b(n, i, 0) end: seq(a(n), n=4..70); # _Alois P. Heinz_, Apr 30 2009

%t Table[Length[Select[IntegerPartitions[n],PrimeQ[Length[#]]&&AllTrue[ #, PrimeQ]&]],{n,4,70}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 18 2016 *)

%Y Cf. A000607, A038499.

%K nonn

%O 4,3

%A _Vladeta Jovovic_, Jul 21 2003

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 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)