A112997 Sum of first n primes minus sum of their indices.
1, 2, 4, 7, 13, 20, 30, 41, 55, 74, 94, 119, 147, 176, 208, 245, 287, 330, 378, 429, 481, 538, 598, 663, 735, 810, 886, 965, 1045, 1128, 1224, 1323, 1427, 1532, 1646, 1761, 1881, 2006, 2134, 2267, 2405, 2544, 2692, 2841, 2993, 3146, 3310, 3485, 3663, 3842
Offset: 1
Keywords
Links
- Michel Marcus, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A007504 (Sum of first n primes).
Programs
-
Mathematica
Table[Total[Take[Table[Prime[n]-n, {n, 1, 20}], i]], {i, 20}] With[{nn=50},Accumulate[Prime[Range[nn]]]-Accumulate[Range[nn]]] (* Harvey P. Dale, Aug 31 2023 *)
-
PARI
a(n) = sum(i=1, n, prime(i)-i); \\ Michel Marcus, Oct 09 2013
Formula
Extensions
More terms from Michel Marcus, Oct 09 2013