OFFSET
1,1
COMMENTS
The n-th partial sum of A096070 is prime iff n is even.
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
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 20 2004
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus, Jun 21 2004
STATUS
approved