OFFSET
0,2
COMMENTS
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..500
EXAMPLE
n = 3: a(3) = 64 because n^2 + 1 + 4 + 9 + 16 + 25 = 9 + (1 + 4 + 9 + 16 + 25) = 64 = 8^2;
n = 4: a(4) = 150700176 because n^2 + (1 + 4 + ... + 767^2) = 150700176 = 12276^2, where 767 is the length of the shortest such consecutive-square sequence which provides(when summed) a new square, namely 12276^2. Often the least solution is rather large. E.g., a(93) = 23850559947150225 which means that 93^2 + A000330(415151) = 8649 + [a long square sum] = 154436265^2 = 23850559947150225.
MATHEMATICA
Do[s = n^2; k = 1; While[s = s + k^2; !IntegerQ[ Sqrt[s]], k++ ]; Print[s], {n, 0, 30} ]
PROG
(PARI) { for (n = 0, 500, s=n^2 + 1; k=1; while (!issquare(s), k++; s+=k^2); write("b065611.txt", n, " ", s) ) } \\ Harry J. Smith, Oct 23 2009
(PARI) a(n) = my(s=n^2+1, k=1); while (!issquare(s), k++; s+=k^2); s; \\ Michel Marcus, Mar 24 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 07 2001
EXTENSIONS
Edited by Jon E. Schoenfield, Jun 14 2018
Name clarified by Michel Marcus, Mar 24 2020
STATUS
approved