OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
N. J. A. Sloane, Transforms
FORMULA
G.f.: Product_{n>=1} (1-x^n)^(-prime(n)).
MAPLE
with(numtheory):
a:= proc(n) option remember; `if`(n=0, 1, add(add(
d*ithprime(d), d=divisors(j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..40); # Alois P. Heinz, Sep 06 2008
MATHEMATICA
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*Prime[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 16 2014, after Alois P. Heinz *)
PROG
(PARI) a(n)=if(n<0, 0, polcoeff(prod(i=1, n, (1-x^i)^-prime(i), 1+x*O(x^n)), n))
(SageMath) # uses[EulerTransform from A166861]
b = EulerTransform(lambda n: nth_prime(n))
print([b(n) for n in range(37)]) # Peter Luschny, Nov 11 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved