|
|
A278922
|
|
Largest p such that n = p + q + r where p < q < r are all prime, or 0 if no such primes p, q, r exist.
|
|
2
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 3, 2, 0, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 2, 5, 2, 7, 2, 5, 2, 7, 2, 7, 2, 7, 2, 11, 2, 11, 2, 5, 2, 11, 2, 13, 2, 11, 2, 13, 2, 13, 2, 11, 2, 17, 2, 13, 2, 13, 2, 17, 2, 17, 2, 17, 2, 19, 2, 19, 2, 13, 2, 17, 2, 19, 2, 17, 2, 23, 2, 19, 2, 19, 2, 23, 2, 23, 2, 23, 2, 23, 2, 29, 2, 23, 2, 29, 2, 29, 2, 23, 2, 29, 2, 31, 2, 31, 2, 29, 2, 31, 2, 29, 2, 31, 2, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,10
|
|
COMMENTS
|
Empirically, a(n) >= 2 for all n >= 18. Since a(2n) = 2 unless it is zero, the terms with even indices are less interesting, and the terms with odd indices are listed in A278923.
For even n, the existence of the three primes reduces to a slightly strengthened* variant of Goldbach's conjecture. For odd n, is a slightly strengthened* variant of the weak (a.k.a. odd, or ternary) Goldbach conjecture, considered to be proved since 2013. (*) In both cases, the strengthening consists of requiring that the three primes must be distinct.
The first occurrence of the n-th prime: 10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, ..., .
Conjecture: primes appear in their natural order.
|
|
LINKS
|
|
|
FORMULA
|
a(2n) = 2 (for n > 4), since one of the three primes must necessarily be even, and that can only be p = 2.
a(n) = 0 for n < 2 + 3 + 5 = 10, and for odd n < 3 + 5 + 7 = 15.
|
|
MATHEMATICA
|
f[n_] := If[OddQ@n || n < 18, Block[{p = 0, q = 3, r = 5}, While[q < r, r = NextPrime@ q; While[r < n - q - 1, If[n < 2q + r && PrimeQ[n - r - q], p = Max[p, n - r - q]; Break[]]; r = NextPrime@ r]; q = NextPrime@ q]; p], 2]; Array[f, 121] (* Robert G. Wilson v, Dec 02 2016 *)
|
|
PROG
|
(PARI) a(n, p=if(bittest(n, 0), n\3-1, 3))=while(p=precprime(p-1), forprime(q=p+1, (n-p-1)\2, isprime(n-p-q)&&return(p)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|