A068307 From Goldbach problem: number of decompositions of n into a sum of three primes.
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
Examples
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
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
- Wikipedia, Goldbach's conjecture.
Crossrefs
Programs
-
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 *)
-
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
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
Extensions
More terms from Vladeta Jovovic, Mar 10 2002
Comments