login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045450 Number of partitions of n into a prime number of distinct prime parts. 6
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)<n, 0,

       b(n, i-1)+(p-> `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 *)

CROSSREFS

Cf. A000586.

Sequence in context: A249072 A174007 A330709 * A029222 A162350 A334305

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 8 11:25 EST 2021. Contains 341948 sequences. (Running on oeis4.)