OFFSET
0,8
COMMENTS
Arises in studying the Goldbach conjecture.
The last negative term appears to be a(303). - T. D. Noe, Dec 05 2006
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
T. D. Noe, 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 g_n]
FORMULA
G.f.: 1/(1+Sum_{k>0} (-x)^prime(k)). - Vladeta Jovovic, Mar 29 2003
MATHEMATICA
CoefficientList[Series[1/(1+Sum[(-x)^Prime[k], {k, 20}]), {x, 0, 70}], x] (* Harvey P. Dale, Aug 26 2020 *)
PROG
(Haskell)
import Data.List (genericIndex)
a002121 n = genericIndex a002121_list n
a002121_list = 1 : 0 : -1 : f 0 (-1) 3 where
f v w x = y : f w y (x + 1) where
y = sum (map (a002121 . (x -)) $ takeWhile (<= x) a065091_list) - v
-- Reinhard Zumkeller, Mar 21 2014
CROSSREFS
KEYWORD
AUTHOR
EXTENSIONS
More terms from Vladeta Jovovic, Mar 29 2003
Entry revised by N. J. A. Sloane, Dec 04 2006
STATUS
approved