OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
prime(1) + 1 = 2 + 1 = 3 (prime, thus a(1));
prime(1) + prime(2) + 1 = 2 + 3 + 1 = 6 (nonprime);
prime(1) + prime(2) + prime(3) + 1 = 2 + 3 + 5 + 1 = 11 (prime, thus a(2)); etc. - Jon E. Schoenfield, Jan 09 2015
MATHEMATICA
p=1; lst={}; Do[p+=Prime[n]; If[PrimeQ[p], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 14 2009 *)
PROG
(UBASIC) 10 x=x+1; 20 if x<>prmdiv(x) then 10; 30 y=x; 40 r=r+y; 50 if r=prmdiv(r) then print r; :p=p+1; 60 if p<100 then 10
(PARI) lista(nn) = {s = 1; for (n=1, nn, s += prime(n); if (isprime(s), print1(s, ", ")); ); } \\ Michel Marcus, Jan 10 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Mar 28 2000
STATUS
approved