A054860 Number of ways of writing 2n+1 as p + q + r where p, q, r are primes with p <= q <= r.
0, 0, 0, 1, 2, 2, 2, 3, 4, 3, 5, 5, 5, 7, 7, 6, 9, 8, 9, 10, 11, 10, 12, 13, 12, 15, 16, 14, 17, 16, 16, 19, 21, 20, 20, 22, 21, 22, 28, 24, 25, 29, 27, 29, 33, 29, 33, 35, 34, 30, 38, 36, 35, 43, 38, 37, 47, 42, 43, 50, 46, 47, 53, 50, 45, 57, 54, 47, 62, 53, 49, 65, 59, 55, 68
Offset: 0
Keywords
Examples
7 = 2 + 2 + 3 so a(3) = 1; 9 = 2 + 2 + 5 = 3 + 3 + 3 so a(4) = 2; 11 = 2 + 2 + 7 = 3 + 3 + 5 so a(5) = 2.
References
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, appendix 3.
- Wolfgang Schwarz, Einfuehrung in Methoden und Ergebnisse der Primzahltheorie, Bibliographisches Institut Mannheim, 1969, ch. 7.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 0..10000 (up to 1000 from _T. D. Noe_)
- H. A. Helfgott, Major arcs for Goldbach's theorem, arXiv 1305.2897 [math.NT], May 14 2013.
Programs
-
Mathematica
nn = 201; t = Table[0, {(nn + 1)/2}]; pMax = PrimePi[nn]; ps = Prime[Range[pMax]]; Do[n = ps[[i]] + ps[[j]] + ps[[k]]; If[n <= nn && OddQ[n], t[[(n + 1)/2]]++], {i, pMax}, {j, i, pMax}, {k, j, pMax}]; t (* T. D. Noe, May 23 2017 *) f[n_] := Length@ IntegerPartitions[2n +1, {3}, Prime@ Range@ PrimePi[2n -3]]; Array[f, 75, 0] (* Robert G. Wilson v, Jun 30 2017 *)
-
PARI
first(n)=my(v=vector(n)); forprime(r=3,2*n-3, v[r\2+2]++); forprime(p=3,(2*n+1)\3, forprime(q=p,(2*n+1-p)\2, forprime(r=q,2*n+1-p-q, v[(p+q+r)\2]++))); concat(0, v) \\ Charles R Greathouse IV, May 25 2017
Comments