cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A054860 Number of ways of writing 2n+1 as p + q + r where p, q, r are primes with p <= q <= r.

This page as a plain text file.
%I A054860 #36 Jul 02 2025 16:01:59
%S A054860 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,
%T A054860 16,16,19,21,20,20,22,21,22,28,24,25,29,27,29,33,29,33,35,34,30,38,36,
%U A054860 35,43,38,37,47,42,43,50,46,47,53,50,45,57,54,47,62,53,49,65,59,55,68
%N A054860 Number of ways of writing 2n+1 as p + q + r where p, q, r are primes with p <= q <= r.
%C A054860 Every sufficiently large odd number is the sum of three primes (th. by Vinogradov, 1937). Goldbach's conjecture requires three ODD primes and then a(n) > 0 for n > 2 is weaker.
%C A054860 The unconditional theorem was proved by Helfgott (see link below). - _T. D. Noe_, May 15 2013
%D A054860 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, appendix 3.
%D A054860 Wolfgang Schwarz, Einfuehrung in Methoden und Ergebnisse der Primzahltheorie, Bibliographisches Institut Mannheim, 1969, ch. 7.
%H A054860 Charles R Greathouse IV, <a href="/A054860/b054860.txt">Table of n, a(n) for n = 0..10000</a> (up to 1000 from _T. D. Noe_)
%H A054860 H. A. Helfgott, <a href="http://arxiv.org/abs/1305.2897">Major arcs for Goldbach's theorem</a>, arXiv 1305.2897 [math.NT], May 14 2013.
%e A054860 7 = 2 + 2 + 3 so a(3) = 1;
%e A054860 9 = 2 + 2 + 5 = 3 + 3 + 3 so a(4) = 2;
%e A054860 11 = 2 + 2 + 7 = 3 + 3 + 5 so a(5) = 2.
%t A054860 nn = 201; t = Table[0, {(nn + 1)/2}]; pMax = PrimePi[nn]; ps =
%t A054860 Prime[Range[pMax]]; Do[n = ps[[i]] + ps[[j]] + ps[[k]]; If[n <= nn &&
%t A054860 OddQ[n], t[[(n + 1)/2]]++], {i, pMax}, {j, i, pMax}, {k, j, pMax}]; t (* _T. D. Noe_, May 23 2017 *)
%t A054860 f[n_] := Length@ IntegerPartitions[2n +1, {3}, Prime@ Range@ PrimePi[2n -3]]; Array[f, 75, 0] (* _Robert G. Wilson v_, Jun 30 2017 *)
%o A054860 (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
%Y A054860 Cf. A007963, A288574.
%K A054860 nonn
%O A054860 0,5
%A A054860 _James Sellers_, May 25 2000