login
Euler transform of {1, primes}.
4

%I #18 Sep 14 2017 08:27:49

%S 1,3,6,14,27,58,109,216,402,760,1390,2550,4569,8178,14408,25280,43850,

%T 75685,129436,220226,371906,624840,1043178,1733108,2863422,4709222,

%U 7706800,12558213,20372860,32917707,52971756,84923643,135640660,215886778,342419132

%N Euler transform of {1, primes}.

%H Alois P. Heinz, <a href="/A030012/b030012.txt">Table of n, a(n) for n = 0..1000</a>

%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>

%p with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: c:= etr(k-> `if`(k<=1, k, ithprime(k-1))): a:= n-> c(n+1): seq(a(n), n=0..40); # _Alois P. Heinz_, Sep 07 2008

%t etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n-j], {j, 1, n}]/n]; b]; c = etr[If[# <= 1, #, Prime[#-1]]&]; a = c[#+1]&; Table[a[n], {n, 0, 35}] (* _Jean-François Alcover_, Mar 10 2014, after _Alois P. Heinz_ *)

%Y Cf. A008578.

%K nonn

%O 0,2

%A _N. J. A. Sloane_.