OFFSET
1,1
COMMENTS
11 belongs to a cycle of length 3 when a(n) is iterated. The paper by Janos studies the set of cycles.
REFERENCES
Ludvik Janos, On Vinagradov's 3-primes theorem, Abstracts Amer. Math. Soc., 25 (No. 2, 2002), p. 398, #01T-11-57.
EXAMPLE
3 has no such representation, so a(1) = 5. The 10th odd prime, 31, equals 23+5+3, with q=23 and no larger q exists, so a(1) = 23.
PROG
(PARI) {forprime(p=3, 300, b=0; q=precprime(p-1); while(b<1&&q>2, r=q; while(b<1&&r>2, s=r; while(b<1&&s>2, if(q+r+s==p, b=1; print1(q, ", "), s=precprime(s-1))); r=precprime(r-1)); q=precprime(q-1)); if(b<1, print1(nextprime(p+1), ", ")))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 25 2003
EXTENSIONS
Are there other cycles? - N. J. A. Sloane.
More terms and PARI code from Klaus Brockhaus, Apr 26 2003
STATUS
approved