login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A235945 Number of partitions of n containing at least one prime. 2
0, 0, 1, 2, 3, 5, 8, 12, 17, 24, 34, 48, 65, 88, 118, 157, 205, 269, 348, 450, 575, 734, 929, 1176, 1473, 1845, 2297, 2856, 3527, 4355, 5346, 6558, 8004, 9759, 11848, 14374, 17363, 20958, 25210, 30292, 36278, 43412, 51792, 61733, 73383, 87146, 103239, 122194 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

FORMULA

a(n) = A000041(n) - A002095(n).

Product_{k>0} 1/(1-x^k) - Product_{k>0} (1-x^prime(k))/(1-x^k). - Alois P. Heinz, Jan 18 2014

EXAMPLE

a(5) = 5 because 5 partitions of 5 contain at least one prime: [5], [3,2], [3,1,1], [2,2,1], [2,1,1,1].

MAPLE

b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

       b(n, i-1)+`if`(i>n or isprime(i), 0, b(n-i, i))))

    end:

a:= n-> combinat[numbpart](n) -b(n, n):

seq(a(n), n=0..50);  # Alois P. Heinz, Jan 18 2014

MATHEMATICA

b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n || PrimeQ[i], 0, b[n-i, i]]]]; a[n_] := PartitionsP[n]-b[n, n]; Table[a[n], {n, 0, 50}] (* Jean-Fran├žois Alcover, Jan 28 2014, after Alois P. Heinz *)

CROSSREFS

Cf. A000041, A002095.

Sequence in context: A280276 A233969 A240202 * A129504 A241553 A241549

Adjacent sequences:  A235942 A235943 A235944 * A235946 A235947 A235948

KEYWORD

nonn

AUTHOR

J. Stauduhar, Jan 17 2014

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 December 10 20:38 EST 2019. Contains 329909 sequences. (Running on oeis4.)