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!)
A096071 Primes arising as a partial sum of A096070. 1
3, 11, 23, 41, 67, 83, 109, 137, 173, 223, 269, 311, 359, 409, 467, 541, 607, 677, 751, 829, 907, 991, 1087, 1181, 1277, 1381, 1487, 1601, 1721, 1847, 1973, 2099, 2237, 2371, 2521, 2659, 2801, 2953, 3109, 3257, 3433, 3593, 3767, 3947, 4111, 4297, 4481 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The n-th partial sum of A096070 is prime iff n is even.
LINKS
EXAMPLE
The sixth partial sum of A096070 is 1+2+3+5+4+8 = 23.
MATHEMATICA
Module[{n, m = 100, s = 0, v = {}}, Reap[For[n = 1, n <= m, n++, k = 1; While[MemberQ[v, k] || PrimeQ[s + k] != EvenQ[n], k++]; If[PrimeQ[s], Sow[s]]; s = s + k; v = Union[v, {k}]]][[2, 1]]] (* Jean-François Alcover, Nov 03 2020, after PARI *)
PROG
(PARI) {m=94; s=0; v=Set([]); for(n=1, m, k=1; while(setsearch(v, k)>0||isprime(s+k)!=(n%2==0), k++); s=s+k; if(n%2==0, print1(s, ", ")); v=setunion(v, Set(k)))}
CROSSREFS
Cf. A096070.
Sequence in context: A289575 A086497 A121509 * A230117 A342174 A159791
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 20 2004
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus, Jun 21 2004
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)