OFFSET
1,1
COMMENTS
We select primes in the alternating partial sums of A006094 (which start -6, 9, -26, 51, -92, 129, -194, 243,...).
The corresponding values of n are 14, 32, 34, 36, 50, 64, 70, 80,...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
For n = 14, a(1) = 1103 = - 2*3 + 3*5 - 5*7 + ....+ 43*47 where 43 = prime(14) and 47 = prime(15).
MAPLE
p:=0:for n from 1 to 500 do:p:=p+((-1)^n)* ithprime(n)*ithprime(n+1):if type(p, prime)=true then printf(`%d, `, p): else fi:od:
MATHEMATICA
Select[Accumulate[Times@@@Partition[Riffle[Times@@@Partition[ Prime[ Range[ 500]], 2, 1], {-1, 1}, {2, -1, 2}], 2]], PrimeQ] (* Harvey P. Dale, Feb 17 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 14 2011
STATUS
approved