%I #10 Feb 17 2015 10:46:53
%S 1103,9281,10949,12157,26921,48757,61949,87407,92459,95923,124087,
%T 162859,198811,289417,363809,467183,530983,754981,792307,830677,
%U 1124051,1537373,1662307,1706251,1830401,2023183,2507963,2534879,3358099,3616721,3912901,3929707
%N Primes of the form sum_{j=1..n} (-1)^j *prime(j)*prime(j+1).
%C We select primes in the alternating partial sums of A006094 (which start -6, 9, -26, 51, -92, 129, -194, 243,...).
%C The corresponding values of n are 14, 32, 34, 36, 50, 64, 70, 80,...
%H Harvey P. Dale, <a href="/A197422/b197422.txt">Table of n, a(n) for n = 1..1000</a>
%e For n = 14, a(1) = 1103 = - 2*3 + 3*5 - 5*7 + ....+ 43*47 where 43 = prime(14) and 47 = prime(15).
%p 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:
%t 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 *)
%Y Cf. A197421.
%K nonn
%O 1,1
%A _Michel Lagneau_, Oct 14 2011
|