cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247657 Partial sums of primes, but with a twist.

This page as a plain text file.
%I A247657 #18 Oct 05 2014 04:00:39
%S A247657 5,23,53,101,359,487,631,1669,5407,6959,7517,8093,9341,10009,15427,
%T A247657 17191,21011,26489,30089,32609,42281,45293,51683,56747,60251,73471,
%U A247657 77509,79561,90197,101513,137209,142867,169489,182047,191717,194981,198301,201661,211943
%N A247657 Partial sums of primes, but with a twist.
%C A247657 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.
%H A247657 Reinhard Zumkeller, <a href="/A247657/b247657.txt">Table of n, a(n) for n = 1..1000</a>
%o A247657 (Haskell)
%o A247657 a247657 n = a247657_list !! (n-1)
%o A247657 a247657_list = f 0 $ drop 2 a000040_list where
%o A247657    f z (p:ps) | a010051' z' == 1 = z' : f z' (delete z' ps)
%o A247657               | otherwise        = f z' ps
%o A247657               where z' = z + p
%o A247657 -- _Reinhard Zumkeller_, Oct 01 2014
%o A247657 (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
%Y A247657 Cf. A247658.
%Y A247657 Cf. A000040, A010051, A007504.
%K A247657 nonn
%O A247657 1,1
%A A247657 _Daniel Joyce_, Oct 01 2014