%I #10 Jun 17 2024 10:03:48
%S 1,4,6,9,12,15,18,21,26,30,34,39,42,45,50,56,60,64,69,72,76,81,86,93,
%T 99,102,105,108,111,120,129,134,138,144,150,154,160,165,170,176,180,
%U 186,192,195,198,205,217,225,228,231,236,240,246,254,260,266,270,274,279
%N An alternating sum of all numbers from prime(n) to prime(n+1).
%C Without the initial term, identical to A024675, cf. formula. Except for the initial terms, also the same as A162800. - _M. F. Hasler_, Jun 01 2013
%H Paolo Xausa, <a href="/A162735/b162735.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = sum_{j= A000040(n).. A000040(n+1)} (-1)^(j+1)*j = A001057(A000040(n+1))-A001057(A000040(n)-1).
%F {1} U A024675.
%e a(1) = 1 = -2+3. a(2) = 4=3-4+5. a(3) = 6 =5-6+7. a(4) = 9 = 7-8+9-10+11.
%t Join[{1}, Most[#] + Differences[#]/2] & [Prime[Range[2, 100]]] (* _Paolo Xausa_, Jun 17 2024 *)
%Y Cf. A000040, A024675, A162800.
%K nonn
%O 1,2
%A _Juri-Stepan Gerasimov_, Jul 13 2009
%E Edited by _R. J. Mathar_, Sep 23 2009