OFFSET
0,7
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
FORMULA
EULER transform of b where b has g.f. Sum {k>0} c(k)*x^k/(1-x^k) where c is inverse EULER transform of characteristic function of prime numbers.
G.f.: Product(1+Sum(x^(i*prime(k)), k=1..infinity), i=1..infinity). - Vladeta Jovovic, Jan 08 2005
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(`if`(isprime(j), b(n-i*j, i-1), 0), j=1..n/i) +b(n, i-1)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..60); # Alois P. Heinz, May 31 2014
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[If[PrimeQ[j], b[n-i*j, i-1], 0], {j, 1, n/i}] + b[n, i-1]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Jun 23 2000
STATUS
approved