cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A023626 Self-convolution of (1, p(1), p(2), ...).

Original entry on oeis.org

1, 4, 10, 22, 43, 80, 137, 222, 343, 508, 737, 1030, 1411, 1888, 2477, 3198, 4059, 5096, 6297, 7702, 9327, 11176, 13301, 15682, 18355, 21344, 24673, 28358, 32411, 36896, 41769, 47082, 52883, 59148, 65937, 73298, 81251, 89776, 98957
Offset: 1

Views

Author

Keywords

Comments

p(1),p(2),p(3)... are the prime numbers (A000040). The analogous sequence for the partition numbers is A048574.

Examples

			G.f. = x + 4*x^2 + 10*x^3 + 22*x^4 + 43*x^5 + 80*x^6 + 137*x^7 + ...
		

Crossrefs

Programs

  • 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
  • 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 *)

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