login
A212530
Difference between the sum of the first n primes s(n) and the nearest square < s(n).
1
1, 1, 1, 1, 3, 5, 9, 13, 19, 8, 16, 1, 13, 25, 4, 20, 40, 17, 39, 14, 36, 7, 33, 2, 36, 5, 39, 2, 36, 72, 39, 2, 52, 11, 67, 26, 84, 43, 105, 62, 17, 83, 38, 110, 59, 2, 82, 37, 127, 76, 21, 113, 54, 152, 97, 40, 146, 85, 22, 130, 61, 175, 118, 57, 181, 114
OFFSET
1,5
COMMENTS
Let A007504(n) the sum of the first n primes. It is proved that between the numbers A007504(n) and A007504(n+1) there must be a square integer.
The sum of the first n primes is asymptotically equivalent to (1/2)*log(n)*n^2.
LINKS
EXAMPLE
a(5) = 3 because the sum of the 5 primes 2 + 3 + 5 + 7 + 11 = 28, and 28 - 25 = 3.
MAPLE
with(numtheory): for n from 1 to 100 do:s:=sum(‘ithprime(k)’, ’k’=1..n):x:=s -floor(sqrt(s-1))^2: printf(`%d, `, x):od:
CROSSREFS
Cf. A007504.
Sequence in context: A074133 A215909 A078735 * A004132 A207187 A359185
KEYWORD
nonn
AUTHOR
Michel Lagneau, May 20 2012
STATUS
approved