|
%I
%S 1,3,5,7,13,19,21,27,29,33,39,45,49,53,57,61,63,65,71,77,79,81,83,95,
%T 97,103,113,119,121,125,135,139,143,149,151,157,163,167,175,183,185,
%U 187,191,199,201,213,217,221,233,251,261,267,273,279,281,287,289,299
%N Difference between the sum of odd indexed primes and even indexed primes.
%C Some odd numbers such as 11, 17, 23 and 25 never appear.
%F a(n) = Sum_{i=0..n-1} (p(2i+2)-p(2i+1)).
%e a(2)=3 as a_o(2)=10 and a_e(2)=7
%t Table[ Sum[ Prime[2i], {i, 1, n}] - Sum[ Prime[2i - 1], {i, 1, n}], {n, 1, 60}]
%o (PARI) pc=1; p1s=0; p2s=0; forprime (p=2,500,pc=3-pc; if (pc==1,p1s=p1s+p,p2s=p2s+p); if (pc==1,print1(p1s-p2s",")))
%K nonn
%O 1,2
%A _Jon Perry_, Nov 29 2002
%E Edited and extended by _Robert G. Wilson v_, Nov 30 2002
|