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!)
A109277 Slowest increasing sequence in which a(n) is a prime closest to the sum of all previous terms. 1
2, 2, 3, 7, 13, 29, 53, 109, 223, 439, 881, 1759, 3517, 7039, 14071, 28151, 56299, 112601, 225217, 450413, 900821, 1801669, 3603317, 7206631, 14413253, 28826519, 57653027, 115306073, 230612149, 461224289, 922448587, 1844897167, 3689794321 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Cf. A109278 fastest increasing sequence in which a(n) is a prime closest to the sum of all previous terms.

LINKS

Table of n, a(n) for n=1..33.

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 smallest one, hence a(3)=3, 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, nxt, prv]]; AppendTo[s, a]; Print[a]; su+=a, {i, 42}]; s

CROSSREFS

Cf. A109278.

Sequence in context: A167348 A068524 A184841 * A093437 A075059 A060357

Adjacent sequences:  A109274 A109275 A109276 * A109278 A109279 A109280

KEYWORD

nonn

AUTHOR

Zak Seidov, Jun 25 2005

EXTENSIONS

Definition and comment clarified by Jonathan Sondow, Jun 16 2012

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 February 26 17:22 EST 2021. Contains 341632 sequences. (Running on oeis4.)