login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A068307
From Goldbach problem: number of decompositions of n into a sum of three primes.
52
0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 4, 2, 3, 2, 5, 2, 5, 3, 5, 3, 7, 3, 7, 2, 6, 3, 9, 2, 8, 4, 9, 4, 10, 2, 11, 3, 10, 4, 12, 3, 13, 4, 12, 5, 15, 4, 16, 3, 14, 5, 17, 3, 16, 4, 16, 6, 19, 3, 21, 5, 20, 6, 20, 2, 22, 5, 21, 6, 22, 5, 28, 5, 24, 7
OFFSET
1,9
COMMENTS
For even n > 2, a(n) = A061358(n-2). - Reinhard Zumkeller, Aug 08 2009
Vinogradov proved that every sufficiently large odd number is the sum of three primes. - T. D. Noe, Mar 27 2013
The two Helfgott papers show that every odd number greater than 5 is the sum of three primes (this is the Odd Goldbach Conjecture). - T. D. Noe, May 14 2013, N. J. A. Sloane, May 18 2013
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..36000 (first 10000 terms from T. D. Noe)
H. A. Helfgott, Minor arcs for Goldbach's problem, arXiv:1205.5252 [math.NT], 2012.
H. A. Helfgott, Major arcs for Goldbach's theorem, arXiv:1305.2897 [math.NT], 2013.
H. A. Helfgott, The ternary Goldbach conjecture is true, arxiv:1312.7748 [math.NT], 2013.
H. A. Helfgott, The ternary Goldbach problem, arXiv:1404.2224 [math.NT], 2014.
Yannick Saouter, Checking the odd Goldbach conjecture up to 10^20, Math. Comp. 67 (222) (1998) 863-866.
Eric Weisstein's World of Mathematics, Vinogradov's Theorem
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010051(i) * A010051(k) * A010051(n-i-k). - Wesley Ivan Hurt, Mar 26 2019
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
EXAMPLE
a(6) = 1 because 6 = 2+2+2,
a(9) = 2 because 9 = 2+2+5 = 3+3+3,
a(15) = 3 because 15 = 2+2+11 = 3+5+7 = 5+5+5,
a(17) = 4 because 17 = 2+2+13 = 3+3+11 = 3+7+7 = 5+5+7.
- Zak Seidov, Jun 29 2017
MATHEMATICA
f[n_] := Block[{c = 0, lmt = PrimePi@ Floor[n/2], p, q}, Do[p = Prime@ i; q = Prime@ j; r = n - p - q; If[ PrimeQ@ r && r >= p, c++ ], {i, lmt}, {j, i}]; c]; Array[f, 91] (* Robert G. Wilson v, Apr 13 2008 *)
Table[Count[IntegerPartitions[n, {3}], _?(AllTrue[#, PrimeQ]&)], {n, 50}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 10 2019 *)
PROG
(PARI) a(n)=my(s); forprime(p=(n+2)\3, n-4, forprime(q=(n-p+1)\2, min(n-p-2, p), if(isprime(n-p-q), s++))); s \\ Charles R Greathouse IV, Jun 29 2017
(Python)
from sympy import isprime, primerange, floor
def a(n):
s=0
for p in primerange(((n + 2)//3), n - 3):
for q in primerange(((n - p + 1)//2), min(n - p - 2, p) + 1):
if isprime(n - p - q): s+=1
return s
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 01 2017, after PARI code by Charles R Greathouse IV
CROSSREFS
First occurrence: A139321. Records: A139322.
Column k=3 of A117278.
Sequence in context: A105149 A355748 A295894 * A363721 A158946 A303428
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Feb 24 2002
EXTENSIONS
More terms from Vladeta Jovovic, Mar 10 2002
STATUS
approved