

A054408


a(n) = smallest positive integer not already in sequence such that the partial sum a(1)+...+a(n) is prime.


8



2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, 36, 20, 28, 38, 40, 32, 42, 46, 48, 44, 52, 56, 60, 54, 58, 66, 50, 64, 62, 70, 84, 90, 72, 92, 76, 86, 94, 74, 88, 68, 82, 80, 102, 96, 100, 114, 98, 78, 112, 120, 110, 108, 106, 126, 122, 130, 132, 134, 124, 128, 118
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

1 is the only odd number in this sequence.  Derek Orr, Feb 07 2015
Conjecture: Every even numbers appears.  N. J. A. Sloane, May 29 2017


LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms n = 1..4100 from N. J. A. Sloane).


MATHEMATICA

t = {2}; Do[i = 1; While[! PrimeQ[Total[t] + i]  MemberQ[t, i], i++]; AppendTo[t, i], {65}]; t (* Jayanta Basu, Jul 04 2013 *)


PROG

(PARI) v=[2]; n=1; while(n<100, if(isprime(vecsum(v)+n)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v \\ Derek Orr, Feb 07 2015


CROSSREFS

Cf. A254337.
See A073659 for another version.
In A055265 only pairs of adjacent terms add to primes.
Sequence in context: A296340 A048213 A283309 * A285637 A205845 A034424
Adjacent sequences: A054405 A054406 A054407 * A054409 A054410 A054411


KEYWORD

nonn,easy


AUTHOR

Henry Bottomley, May 09 2000


STATUS

approved



