OFFSET
6,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 6..10000
MAPLE
b:= proc(n, i) option remember; series(`if`(n=0, 1,
`if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
`if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 4)
end:
a:= n-> coeff(b(n, numtheory[pi](n)), x, 3):
seq(a(n), n=6..90); # Alois P. Heinz, Feb 24 2021
MATHEMATICA
b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
If[i<0, 0, Function[p, If[p>n, 0, x*b[n-p, i-1]]][
If[i == 0, 1, Prime[i]]] + b[n, i-1]]], {x, 0, 4}];
a[n_] := Coefficient[b[n, PrimePi[n]], x, 3];
Table[a[n], {n, 6, 1000}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 24 2021
STATUS
approved