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!)
A068524 a(1) = 2; for n > 1, a(n) = largest prime not exceeding a(1) + ... + a(n-1). 4
2, 2, 3, 7, 13, 23, 47, 97, 193, 383, 769, 1531, 3067, 6133, 12269, 24533, 49069, 98129, 196247, 392503, 785017, 1570007, 3140041, 6280067, 12560147, 25120289, 50240587, 100481167, 200962327, 401924639, 803849303, 1607698583, 3215397193 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

EXAMPLE

a(4) = largest prime not exceeding a(3) + a(2) + a(1) = 3 + 2 + 2 = 7; so a(4) = 7.

MAPLE

A[1]:= 2: S:= 2:

for n from 2 to 100 do

  A[n]:= prevprime(S+1);

  S:= S + A[n];

od:

seq(A[i], i=1..100); # Robert Israel, Jul 08 2020

MATHEMATICA

s={2}; ss=2; Do[a=If[PrimeQ[ss], ss, Prime[PrimePi[ss]]]; AppendTo[s, a]; AddTo[ss, a], {i, 40}]; A068524=s - Zak Seidov, Sep 10 2005

PROG

(PARI) /* Version 2.1.5 of PARI uses Pocklington-Lehmer to certify primality */ /* of a_n when 1 is used as the optional flag in isprime: isprime(a_n, 1) */ {a1=2; a2=2; print1(a1, ", ", a2, ", "); s=a1+a2; for(n=3, 40, a_n=precprime(s); if(isprime(a_n, 1), print1(a_n, ", "); s=s+a_n, error("very unlikely event occurred: ", a_n, " is a strong pseudoprime to up to 10 randomly-chosen bases but is not prime")))} (Rick L. Shepherd)

CROSSREFS

Sequence in context: A153940 A049905 A167348 * A184841 A109277 A093437

Adjacent sequences:  A068521 A068522 A068523 * A068525 A068526 A068527

KEYWORD

nonn

AUTHOR

Joseph L. Pe, Mar 21 2002

EXTENSIONS

More terms from Rick L. Shepherd, Jun 15 2004

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 March 5 16:55 EST 2021. Contains 341827 sequences. (Running on oeis4.)