login
A077354
a(n) = Sum_{i=n+1..2n} prime(i) - Sum_{i=1..n} prime(i).
0
1, 7, 21, 43, 73, 115, 165, 227, 301, 381, 471, 569, 685, 809, 937, 1089, 1247, 1425, 1611, 1809, 2023, 2249, 2479, 2735, 2997, 3267, 3553, 3859, 4181, 4513, 4835, 5191, 5547, 5937, 6335, 6745, 7171, 7607, 8059, 8523, 9005, 9507, 10007, 10527
OFFSET
1,2
COMMENTS
The analogous sequence for the natural numbers gives the squares.
FORMULA
From Ridouane Oudra, Aug 31 2019: (Start)
a(n) = Sum_{i=1..n} (prime(n+i) - prime(i)), where prime(i) = A000040(i).
a(n) = A131740(n) - A007504(n). (End)
PROG
(PARI) s1=0:s2=0:for(n=1, 50, s1=s1+prime(n):s2=s2+prime(2*n)+prime(2*n-1):print1(s2-2*s1", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 05 2002
EXTENSIONS
More terms from Ralf Stephan, Mar 30 2003
Rewrote definition, changed offset. - N. J. A. Sloane, Aug 31 2019
STATUS
approved