OFFSET
1,2
COMMENTS
Also numbers n such that the sum of the first n "primes", as defined in A008578, is prime. Analogous to A013916. - Robert G. Wilson v, May 19 2015
Integers k such that A007504(k) + 1 is prime. - Michel Marcus, Aug 10 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
25 is a term: 1 + Sum_{k=1..25} prime(k) = 1061 is prime.
MAPLE
a:=proc(n) if isprime(1+add(ithprime(k), k=1..n))=true then n else fi end: seq(a(n), n=1..600); # Emeric Deutsch, Jul 02 2005
# alternative
Primes:= select(isprime, [2, seq(2*i+1, i=1..10^5)]):
PS:= ListTools:-PartialSums(Primes):
select(t -> isprime(PS[t]+1), [$1..nops(PS)]); # Robert Israel, May 19 2015
MATHEMATICA
Position[1 + Accumulate@ Prime@ Range@ 600, _?(PrimeQ@# &)] // Flatten (* after Harvey P. Dale from A013916 *) (* Robert G. Wilson v, May 19 2015 *)
PROG
(PARI) for(n=1, 10^3, if(isprime(1+sum(i=1, n, prime(i))), print1(n, ", "))) \\ Derek Orr, May 19 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Yalcin Aktar, Dec 10 2003
EXTENSIONS
Corrected and extended by Emeric Deutsch, Jul 02 2005
STATUS
approved