login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089228 Numbers n such that 1 + Sum_{k=1..n} prime(k) is prime. 3
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 (list; graph; refs; listen; history; text; internal format)
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

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(8)=25: 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

Cf. A013916, A014284.

Sequence in context: A126278 A121259 A211139 * A262602 A133847 A134180

Adjacent sequences:  A089225 A089226 A089227 * A089229 A089230 A089231

KEYWORD

nonn

AUTHOR

Yalcin Aktar, Dec 10 2003

EXTENSIONS

Corrected and extended by Emeric Deutsch, Jul 02 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 05:17 EDT 2021. Contains 347577 sequences. (Running on oeis4.)