login
This site is supported by donations to The OEIS 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). 2
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; internal format)
OFFSET

1,1

EXAMPLE

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

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 (zakseidov(AT)yahoo.com), 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 (joseph_l_pe(AT)hotmail.com), Mar 21 2002

EXTENSIONS

More terms from Rick L. Shepherd (rshepherd2(AT)hotmail.com), Jun 15 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 10:06 EST 2012. Contains 205763 sequences.