OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
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
KEYWORD
nonn
AUTHOR
J. Stauduhar, Jan 17 2014
STATUS
approved