

A113029


a(1) = 2, a(2) = 3; for n>2, a(n) = least prime equal to the sum of two or more previous terms.


0



2, 3, 5, 7, 17, 19, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

A heuristic argument suggests that all primes except 11, 13 and 23 are included in this series (tested on first million primes).  Ryan Murphy (murphy(AT)minegoboom.com), Jan 24 2006
Except for 17 which uses all 4 of the previous terms, all the other terms so far use only two or three of the previous terms. This is a more restrictive application of the Goldbach conjecture.  Robert G. Wilson v, Apr 08 2007, May 05 2007
Up to 10^4, all a(n) requiring 4 terms are of the form a(n)=2+7+m+p with m=5 or m=19, i.e., of the form 14+p or 28+p; no a(n)<10^6 requires more than 4 terms.  M. F. Hasler, May 04 2007
Ryan Murphy's heuristic is correct: a(n) = prime(n+3) for n > 6. It suffices to check that all n in 36..72 are the sum of one or more members of this sequence. Thus, all n > 72 are the sum of two or more distinct members of this sequence, since by Bertrand's postulate there is a prime n/2 < p < n.  Charles R Greathouse IV, Aug 22 2011


LINKS

Table of n, a(n) for n=1..58.


EXAMPLE

5 = 2+3 follows 3, 7 = 5+2 follows 5, 17 = 2+3+5+7 follows 7.


MATHEMATICA

(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[lst_List] := Block[{k = Length@ lst, p = Infinity, q}, lmt = If[k > 5, Sum[Binomial[k, i], {i, 2, 4}], 2^k + 1]; k++; While[k < lmt, q = Plus @@ NthSubset[k, lst]; If[ ! MemberQ[lst, q] && PrimeQ@q && q < p, p = q]; k++ ]; Append[lst, p]]; Nest[f, {2, 3}, 58] (* Robert G. Wilson v *)


PROG

(PARI) prevprime(p)={ if( nextprime(p1)<p  p<3, return((p1)*(p>2))); p=bitor(p3, 1); while( nextprime(p) > p, p=2 ); p } \ decomp(n, p)={local(d); if(!p, if(n==2  n==3, return([n]), p=n), p=min(n, p)); while( p=prevprime(p), if( bittest(disallowed, p), next); if( (n<2*p && isprime(np) && !bittest(disallowed, np) && d=[np])  d=decomp( np, p ), return(concat(d, p)) ))} \ disallowed=0; forprime(p=1, 10^4, if(decomp(p), print1(p", "), disallowed+=1<<p)) \\ M. F. Hasler, May 04 2007
(PARI) a(n)=if(n>6, prime(n+3), [2, 3, 5, 7, 17, 19][n]) \\ Charles R Greathouse IV, Aug 22 2011


CROSSREFS

Sequence in context: A214588 A089968 A164060 * A090432 A301918 A127042
Adjacent sequences: A113026 A113027 A113028 * A113030 A113031 A113032


KEYWORD

easy,nonn


AUTHOR

Amarnath Murthy, Jan 03 2006


EXTENSIONS

More terms from Ryan Murphy (murphy(AT)minegoboom.com), Jan 24 2006
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 14 2007


STATUS

approved



