%I #16 Aug 31 2023 16:29:49
%S 1,2,4,7,13,20,30,41,55,74,94,119,147,176,208,245,287,330,378,429,481,
%T 538,598,663,735,810,886,965,1045,1128,1224,1323,1427,1532,1646,1761,
%U 1881,2006,2134,2267,2405,2544,2692,2841,2993,3146,3310,3485,3663,3842
%N Sum of first n primes minus sum of their indices.
%H Michel Marcus, <a href="/A112997/b112997.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = A007504(n) - n(n+1)/2.
%F a(n) = Sum_{k=1..n} A014689(n) = partial sums of A014689. - Philippe Lallouet (philip.lallouet(AT)orange.fr), Aug 27 2008
%t Table[Total[Take[Table[Prime[n]-n, {n, 1, 20}], i]], {i, 20}]
%t With[{nn=50},Accumulate[Prime[Range[nn]]]-Accumulate[Range[nn]]] (* _Harvey P. Dale_, Aug 31 2023 *)
%o (PARI) a(n) = sum(i=1, n, prime(i)-i); \\ _Michel Marcus_, Oct 09 2013
%Y Cf. A007504 (Sum of first n primes).
%K nonn
%O 1,2
%A _Zak Seidov_, Jan 03 2006
%E More terms from _Michel Marcus_, Oct 09 2013
|