OFFSET
0,4
COMMENTS
Arises in studying the Goldbach conjecture.
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..1000
P. A. MacMahon, Properties of prime numbers deduced from the calculus of symmetric functions, Proc. London Math. Soc., 23 (1923), 290-316. = Coll. Papers, II, pp. 354-380. [The sequence I_n]
FORMULA
G.f.: 1/(1 - Sum_{k>=2} x^prime(k))^2. - Ilya Gutkovskiy, Apr 11 2017
MAPLE
M:=120; f:=array(0..M); f[0]:=1; f[1]:=0; f[2]:=0; for n from 3 to M do t1:=0; for k from 2 to n do p := ithprime(k); if p <= n then t1 := t1 + f[n-p]; fi; od: f[n]:=t1; od: # f is A002124
MATHEMATICA
CoefficientList[Series[1/(1 - Sum[x^Prime[k], {k, 2, 50}])^2, {x, 0, 50}], x] (* Indranil Ghosh, Apr 12 2017 *)
PROG
(Haskell)
a002125 n = a002125_list !! n
a002125_list = uncurry conv $ splitAt 1 a002124_list where
conv xs (z:zs) = sum (zipWith (*) xs $ reverse xs) : conv (z:xs) zs
-- Reinhard Zumkeller, Mar 21 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Dec 03 2006
STATUS
approved