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.
From Robert G. Wilson v, Dec 02 2016: (Start)
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
M. F. Hasler, Dec 01 2016
STATUS
approved