Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A068524
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A068524 a(1) = 2; for n > 1, a(n) = largest prime not exceeding a(1) + ... + a(n-1). +0
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; listen)
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

PROGRAM

(PARI) /* Version 2.1.5 of GP/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

Adjacent sequences: A068521 A068522 A068523 this_sequence A068525 A068526 A068527

Sequence in context: A127165 A100683 A049905 this_sequence A109277 A093437 A060357

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 7 14:39 EDT 2008. Contains 144666 sequences.


AT&T Labs Research