login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247657 Partial sums of primes, but with a twist. 2
5, 23, 53, 101, 359, 487, 631, 1669, 5407, 6959, 7517, 8093, 9341, 10009, 15427, 17191, 21011, 26489, 30089, 32609, 42281, 45293, 51683, 56747, 60251, 73471, 77509, 79561, 90197, 101513, 137209, 142867, 169489, 182047, 191717, 194981, 198301, 201661, 211943 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
We start with the primes, 2 3 5 7 11 13 17 19 ..., and form the partial sums (starting with the first two terms), 2+3 = 5, ..., but whenever the partial sum is a prime, we remove it from the list of primes to be added later. Thus, 5 will not be added, and the next term in the partial sums is 2+3+7 = 12, and then 2+3+7+11 = 23, which is again prime, thus not used (later) in the partial sum. The primes that are removed are 5, 23, 53, 101, 359, 487, 631, 1669,... and the partial sums are A247658.
LINKS
PROG
(Haskell)
a247657 n = a247657_list !! (n-1)
a247657_list = f 0 $ drop 2 a000040_list where
f z (p:ps) | a010051' z' == 1 = z' : f z' (delete z' ps)
| otherwise = f z' ps
where z' = z + p
-- Reinhard Zumkeller, Oct 01 2014
(PARI) {omit=[]; s=2; forprime(p=3, 999, if(vecsearch(omit, p), omit=vecextract(omit, "^1"); next); isprime(s+=p)||next; print1(s", "); omit=concat(omit, s))} \\ M. F. Hasler, Oct 04 2014
CROSSREFS
Cf. A247658.
Sequence in context: A135771 A327409 A140811 * A241099 A338977 A090686
KEYWORD
nonn
AUTHOR
Daniel Joyce, Oct 01 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 12:04 EDT 2024. Contains 374282 sequences. (Running on oeis4.)