|
|
A226027
|
|
a(n) is the largest prime that is a sum of some 3 distinct previous terms.
|
|
1
|
|
|
5, 7, 11, 23, 41, 71, 101, 179, 257, 443, 521, 971, 1499, 2477, 2927, 3191, 3719, 6917, 9851, 13577, 16061, 25919, 39503, 53087, 56813, 96323, 149417, 245747, 342077, 491501, 494699, 986207, 1231961, 1726667, 2068751, 2165081, 4233839, 5220053, 5714759, 7879847
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Initial terms {2,3,5} and {3,5,7} give no prime, hence we start with a(1..3) = {5, 7, 11}.
Is the sequence infinite?
The Mathematica program is fast because it uses that fact that 7 must be one of the three numbers in the sum. Note that p = 5 (mod 6) for all terms but 7. - T. D. Noe, May 24 2013
|
|
LINKS
|
|
|
MATHEMATICA
|
t = {5, 11}; Do[u = Subsets[t, {2}]; w = Reverse[Sort[7 + Total /@ u]]; s = Select[w, PrimeQ, 1]; mx = s[[1]]; AppendTo[t, mx], {97}]; t = Insert[t, 7, 2] (* T. D. Noe, May 24 2013 *)
|
|
PROG
|
(PARI) N=50; v=vector(N); v[1]=5; v[2]=7; v[3]=11; n=3; while(n<N, m=0; for(i=1, n, for(j=i+1, n, for(k=j+1, n, t=v[i]+v[j]+v[k]; if(t>m && isprime(t), m=t)))); if(m>0, n++; v[n]=m)); v /* from Ralf Stephan */
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|