[go: up one dir, main page]

login
A001031
Goldbach conjecture: a(n) = number of decompositions of 2n into sum of two primes (counting 1 as a prime).
(Formerly M0213 N0077)
22
1, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 4, 3, 2, 4, 3, 4, 4, 3, 3, 5, 4, 4, 6, 4, 3, 6, 3, 4, 7, 4, 5, 6, 3, 5, 7, 6, 5, 7, 5, 5, 9, 5, 4, 10, 4, 5, 7, 4, 6, 9, 6, 6, 9, 7, 7, 11, 6, 6, 12, 4, 5, 10, 4, 7, 10, 6, 5, 9, 8, 8, 11, 6, 5, 13, 5, 8, 11, 6, 8, 10, 6, 6, 14, 9, 6, 12, 7, 7, 15, 7, 8, 13, 5, 8, 12, 8, 9
OFFSET
1,2
REFERENCES
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 9.
Deshouillers, J.-M.; te Riele, H. J. J.; and Saouter, Y.; New experimental results concerning the Goldbach conjecture. Algorithmic number theory (Portland, OR, 1998), 204-215, Lecture Notes in Comput. Sci., 1423, Springer, Berlin, 1998.
Apostolos Doxiadis: Uncle Petros and Goldbach's Conjecture, Faber and Faber, 2001
R. K. Guy, Unsolved problems in number theory, second edition, Springer-Verlag, 1994.
D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 79.
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).
M. L. Stein and P. R. Stein, Tables of the Number of Binary Decompositions of All Even Numbers Less Than 200,000 into Prime Numbers and Lucky Numbers. Report LA-3106, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Sep 1964.
LINKS
G. H. Hardy and J. E. Littlewood, Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes, Acta Math., Vol. 44, No. 1 (1923), pp. 1-70.
J. Richstein, Verifying the Goldbach conjecture up to 4*10^14, Mathematics of Computation, Vol. 70, No. 236, pp. 1745-1749, 2001.
Matti K. Sinisalo, Checking the Goldbach conjecture up to 4*10^11, Mathematics of Computation, Vol. 61, No. 204, pp. 931-934, October 1993.
Eric Weisstein's World of Mathematics, Goldbach Partition
FORMULA
Not very efficient: a(n) = (Sum_{i=1..n} (pi(i) - pi(i-1))*(pi(2*n-i) - pi(2*n-i-1))) + (pi(2*n-1) - pi(2*n-2)) + floor(1/n). - Wesley Ivan Hurt, Jan 06 2013
a(n) = floor((A096139(n)+1)/2). - Reinhard Zumkeller, Aug 28 2013
EXAMPLE
1 is counted as a prime, so a(1)=1 since 2=1+1, a(2)=2 since 4=2+2=3+1, ..
MATHEMATICA
nn = 10^2; ps = Boole[PrimeQ[Range[2*nn]]]; ps[[1]] = 1; Table[Sum[ps[[i]] ps[[2*n - i]], {i, n}], {n, nn}] (* T. D. Noe, Apr 11 2011 *)
PROG
(Haskell)
a001031 n = sum (map a010051 gs) + fromEnum (1 `elem` gs)
where gs = map (2 * n -) $ takeWhile (<= n) a008578_list
-- Reinhard Zumkeller, Aug 28 2013
(PARI) a(n)=my(s); forprime(p=2, n, if(isprime(2*n-p), s++)); if(isprime(2*n-1), s+1, s) \\ Charles R Greathouse IV, Feb 06 2017
CROSSREFS
Sequence in context: A189172 A286888 A257212 * A336543 A035250 A165054
KEYWORD
nonn,easy,nice
EXTENSIONS
More terms from Ray Chandler, Sep 19 2003
STATUS
approved