[go: nahoru, domu]

login
A089228
Numbers m such that 1 + Sum_{k=1..m} prime(k) is prime.
7
1, 3, 5, 7, 9, 13, 19, 25, 29, 31, 49, 51, 57, 97, 99, 103, 109, 119, 123, 127, 163, 169, 179, 185, 195, 207, 209, 211, 213, 217, 221, 223, 233, 235, 239, 251, 261, 269, 273, 289, 295, 297, 303, 325, 329, 333, 347, 369, 371, 375, 409, 439, 449, 453, 455, 467
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
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