OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Scatterplot of the first 5000000 terms
EXAMPLE
The first terms, alongside the corresponding running totals, are:
n a(n) t(n)
-- ---- --------
1 1 1 = 1^2
2 3 4 = 2^2
3 4 0 = 0^2
4 9 9 = 3^2
5 7 16 = 4^2
6 12 4 = 2^2
7 5 9 = 3^2
8 8 1 = 1^2
9 15 16 = 4^2
10 16 0 = 0^2
11 25 25 = 5^2
PROG
(PARI) s=t=0; for (n=1, 65, for (v=1, oo, if (!bittest(s, v) && issquare(u=t-v*(-1)^v), print1 (v", "); s+=2^v; t=u; break)))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Dec 12 2019
STATUS
approved