login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226027 a(n) is the largest prime that is a sum of some 3 distinct previous terms. 1

%I #13 May 24 2013 13:07:17

%S 5,7,11,23,41,71,101,179,257,443,521,971,1499,2477,2927,3191,3719,

%T 6917,9851,13577,16061,25919,39503,53087,56813,96323,149417,245747,

%U 342077,491501,494699,986207,1231961,1726667,2068751,2165081,4233839,5220053,5714759,7879847

%N a(n) is the largest prime that is a sum of some 3 distinct previous terms.

%C Initial terms {2,3,5} and {3,5,7} give no prime, hence we start with a(1..3) = {5, 7, 11}.

%C Is the sequence infinite?

%C 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

%H Zak Seidov and T. D. Noe, <a href="/A226027/b226027.txt">Table of n, a(n) for n = 1..500</a> (first 123 from Zak Seidov)

%t 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 *)

%o (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_ */

%K nonn

%O 1,1

%A _Zak Seidov_, May 23 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)