login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A030009
Euler transform of primes.
10
1, 2, 6, 15, 37, 85, 192, 414, 879, 1816, 3694, 7362, 14480, 28037, 53644, 101379, 189587, 350874, 643431, 1169388, 2108045, 3770430, 6694894, 11804968, 20679720, 35999794, 62298755, 107198541, 183462856, 312357002, 529173060, 892216829, 1497454396, 2502190992
OFFSET
0,2
LINKS
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
Cf. A007441.
Sequence in context: A017923 A238830 A018018 * A061261 A335903 A291414
KEYWORD
nonn
AUTHOR
STATUS
approved