OFFSET
1,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
G.f: x*(1+b(x))^2 = (c(x)^2)/x, where b(x) and c(x) are respectively the g.f. of A000040 and A008578. - Mario C. Enriquez, Dec 10 2016
EXAMPLE
G.f. = x + 4*x^2 + 10*x^3 + 22*x^4 + 43*x^5 + 80*x^6 + 137*x^7 + ...
MATHEMATICA
z = 100; p = Join[{1}, Prime[Range[z]]];
a[n_] := Sum[p[[i]] p[[n - i + 1]], {i, 1, n}];
Table[a[n], {n, 1, z}] (* Clark Kimberling, Dec 01 2016 *)
a[ n_] := If[ n < 1, 0, SeriesCoefficient[ (1 + O[x]^n + Sum[ Prime[k] x^k, {k, n - 1}])^2, {x, 0, n - 1}]]; (* Michael Somos, Dec 01 2016 *)
Table[With[{c=Join[{1}, Prime[Range[n]]]}, ListConvolve[c, c]], {n, 0, 40}]// Flatten (* Harvey P. Dale, Oct 19 2018 *)
PROG
(Haskell)
a023626 n = a023626_list !! (n-2)
a023626_list = f a000040_list [1] where
f (p:ps) rs = (sum $ zipWith (*) rs a008578_list) : f ps (p : rs)
-- Reinhard Zumkeller, Nov 09 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved