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”).
%I #22 Nov 11 2020 09:08:47
%S 1,2,6,15,37,85,192,414,879,1816,3694,7362,14480,28037,53644,101379,
%T 189587,350874,643431,1169388,2108045,3770430,6694894,11804968,
%U 20679720,35999794,62298755,107198541,183462856,312357002,529173060,892216829,1497454396,2502190992
%N Euler transform of primes.
%H Alois P. Heinz, <a href="/A030009/b030009.txt">Table of n, a(n) for n = 0..1000</a>
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>
%F G.f.: Product_{n>=1} (1-x^n)^(-prime(n)).
%p with(numtheory):
%p a:= proc(n) option remember; `if`(n=0, 1, add(add(
%p d*ithprime(d), d=divisors(j))*a(n-j), j=1..n)/n)
%p end:
%p seq(a(n), n=0..40); # _Alois P. Heinz_, Sep 06 2008
%t 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_ *)
%o (PARI) a(n)=if(n<0,0,polcoeff(prod(i=1,n,(1-x^i)^-prime(i),1+x*O(x^n)),n))
%o (SageMath) # uses[EulerTransform from A166861]
%o b = EulerTransform(lambda n: nth_prime(n))
%o print([b(n) for n in range(37)]) # _Peter Luschny_, Nov 11 2020
%Y Cf. A007441.
%K nonn
%O 0,2
%A _N. J. A. Sloane_.