OFFSET
1,1
COMMENTS
Primes p = prime(m) such that Sum_{k=1..p} prime(m+k) is prime. - Corrected by Zak Seidov, May 25 2017
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Zak Seidov, A175783
EXAMPLE
a(1) = 3 because sum s of 3 primes after 3, s = 5+7+11 = 23, is prime.
a(2) = 5 because sum s of 5 primes after 5, s = 7+11+13+17+19 = 67, is prime.
MATHEMATICA
Reap[Do[p = Prime[n]; If[PrimeQ[s = Sum[Prime[n + k], {k, p}]], Sow[p]], {n, 2, 1000}]][[2, 1]] (* corrected by Zak Seidov, May 25 2017 *)
PROG
(Magma) [p: i in [1..1000] | IsPrime(S) where S is &+[NthPrime(i+k): k in [1..p]] where p is NthPrime(i)]; // Bruno Berselli, May 25 2017
(PARI) list(lim)=my(v=List(), p=1, r=2, s=2, t); forprime(q=2, lim, s-=q; t=q-p+1; while(t, r=nextprime(r+1); s+=r; t--); if(isprime(s), listput(v, q)); p=q); Vec(v) \\ Charles R Greathouse IV, May 25 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 03 2010
STATUS
approved