OFFSET
1,1
COMMENTS
This sequence is a variant of A338699; here we use squares, there powers of 2.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Density plot of the first 1000000 terms
EXAMPLE
The first terms, alongside the prime numbers (p(n)) and their partial sums (pp(n)), b(n) and their partial sums (bb(n)), are:
n a(n) p(n) pp(n) b(n) bb(n)
-- ---- ---- ----- ---- -----
1 2 2 2 4 4
2 3 3 5 4 8
3 2 5 10 4 12
4 4 7 17 9 21
5 2 11 28 9 30
6 5 13 41 16 46
7 4 17 58 16 62
8 1 19 77 16 78
9 3 23 100 25 103
10 10 29 129 36 139
11 15 31 160 36 175
12 14 37 197 36 211
13 9 41 238 36 247
14 2 43 281 36 283
15 4 47 328 49 332
PROG
(PARI) pp=0; bb=0; b=0; forprime (p=2, 349, pp+=p; while (bb+b^2<pp, b++); bb+=b^2; print1 (bb-pp", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 15 2021
STATUS
approved