OFFSET
1,1
COMMENTS
A109277 is the slowest increasing sequence in which a(n) is a prime closest to the sum of all previous terms.
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
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 25 2005
EXTENSIONS
Definition and comment clarified by Jonathan Sondow, Jun 16 2012
STATUS
approved