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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A045450 Number of partitions of n into a prime number of distinct prime parts. 8
 1, 0, 1, 1, 1, 2, 0, 2, 1, 2, 2, 3, 0, 4, 2, 4, 3, 4, 2, 5, 3, 5, 3, 5, 3, 6, 5, 5, 5, 7, 5, 9, 5, 7, 8, 8, 6, 11, 8, 11, 9, 12, 10, 14, 11, 15, 12, 15, 13, 18, 17, 17, 16, 18, 18, 23, 20, 22, 23, 25, 23, 30, 26, 28, 29, 32, 32, 36, 34, 38, 38, 41, 41, 47, 45, 47, 48, 50, 54, 58, 57, 60, 63 (list; graph; refs; listen; history; text; internal format)
 OFFSET 5,6 LINKS Alois P. Heinz, Table of n, a(n) for n = 5..5000 EXAMPLE a(50) = 15 because there are 15 partitions of 50 into a prime number of distinct prime parts: 2+7+11+13+17 = 2+5+11+13+19 = 2+5+7+17+19 = 2+5+7+13+23 = 2+3+5+17+23 = 2+3+5+11+29 = 2+19+29 = 2+17+31 = 2+11+37 = 2+7+41 = 2+5+43 = 19+31 = 13+37 = 7+43 = 3+47. MAPLE s:= proc(n) if n<1 then 0 else ithprime(n)+s(n-1) fi end: b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(s(i) `if`(p>n, 0, x*b(n-p, i-1)))(ithprime(i))))) end: a:= n-> (p-> add(`if`(isprime(i), coeff(p, x, i), 0) , i=2..degree(p)))(b(n, numtheory[pi](n))): seq(a(n), n=5..100); # Alois P. Heinz, Sep 18 2017 MATHEMATICA partprim[n_] := Module[{sp, spq, sps}, sp = Subsets[Prime[Range[PrimePi[n]]]]; spq = Select[sp, PrimeQ@Length@# &]; sps = Select[spq, n == Plus@@# &]; sps // Length // Return]; Table[partprim[n], {n, 5, 80}] (* Andres Cicuttin, Sep 17 2017 *) s[n_] := s[n] = If [n < 1, 0, Prime[n] + s[n - 1]]; b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[s[i] < n, 0, b[n, i - 1] + Function[p, If[p > n, 0, x*b[n - p, i - 1]]][Prime[i]]]]]; a[n_] := Function[p, Sum[If[PrimeQ[i], Coefficient[p, x, i], 0], {i, 2, Exponent[p, x]}]][b[n, PrimePi[n]]]; Table[a[n], {n, 5, 100}] (* Jean-François Alcover, Jun 11 2021, after Alois P. Heinz *) Table[Count[IntegerPartitions[n], _?(AllTrue[#, PrimeQ]&&Length[#]==Length[ Union[ #]] && PrimeQ[Length[#]]&)], {n, 5, 90}] (* Harvey P. Dale, May 17 2024 *) CROSSREFS Cf. A000586. Sequence in context: A249072 A174007 A330709 * A347419 A029222 A162350 Adjacent sequences: A045447 A045448 A045449 * A045451 A045452 A045453 KEYWORD nonn AUTHOR Vladeta Jovovic, Jul 21 2003 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.

Last modified June 23 04:59 EDT 2024. Contains 373629 sequences. (Running on oeis4.)