OFFSET
0,3
COMMENTS
Partial sums of A023360.
MAPLE
b:= proc(n) option remember; `if`(n=0, 1,
add(`if`(isprime(j), b(n-j), 0), j=2..n))
end:
a:= proc(n) option remember;
`if`(n<0, 0, b(n)+a(n-1))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Apr 28 2018
MATHEMATICA
nmax = 43; CoefficientList[Series[1/((1 - x) (1 - Sum[x^Prime[k], {k, 1, nmax}])), {x, 0, nmax}], x]
a[0] = 1; a[n_] := a[n] = Sum[Boole[PrimeQ[k]] a[n - k], {k, 1, n}]; Accumulate[Table[a[n], {n, 0, 43}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 28 2018
STATUS
approved