Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A109278
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A109278 Fastest increasing sequence: a(n) is a prime closest to the sum of all previous terms. +0
2
2, 2, 5, 11, 19, 41, 79, 157, 317, 631, 1259, 2521, 5039, 10079, 20161, 40343, 80669, 161333, 322669, 645329, 1290673, 2581349, 5162681, 10325369, 20650753, 41301493, 82602997, 165205981, 330411959, 660823921, 1321647869, 2643295709 (list; graph; listen)
OFFSET

1,1

COMMENT

Cf. A109277 slowest increasing sequence.

EXAMPLE

a(1)=2, sum(1)=2; prime closest to sum is 2, hence a(2)=2, sum(2)=4; there are two primes 3 and 5 closest to sum(2), we choose the largest one, hence a(3)=5, sum(3)=7, etc.

MATHEMATICA

s={2}; su=2; Do[If[PrimeQ[su], a=su, pp=PrimePi[su]; prv=Prime[pp]; nxt=Prime[pp+1]; a=If[su-prv<nxt-su, prv, nxt]]; AppendTo[s, a]; Print[a]; su+=a, {i, 42}]; s

CROSSREFS

Cf. A109277.

Sequence in context: A005637 A104080 A078405 this_sequence A112527 A049680 A058021

Adjacent sequences: A109275 A109276 A109277 this_sequence A109279 A109280 A109281

KEYWORD

nonn

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), Jun 25 2005

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 August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research