OFFSET
1,2
COMMENTS
The sequence include as first term the only case where S(k) = -1 times a prime: S(1) = -2.
EXAMPLE
S(3) = ((0+2*-1)+3*1)+5*-1 = -4, S(4) = -4 + 7*1 = 3 is prime, hence 4 is a term.
S(5) = ((((0+2*-1)+3*1)+5*-1)+7*1)+11*-1 = -8, S(6) = -8 + 13*1 = 5 is prime, hence 6 is a term.
MATHEMATICA
S=0; Do[S=S+Prime[n]*(-1)^n; If[PrimeQ[S]==True, Print[n]], {n, 1, 10^3, 1}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Manuel Valdivia, Oct 03 2007
STATUS
approved