login
A065610
Smallest number m so that n^2 + A000330(m) is also a square, i.e., n^2 + (1 + 4 + 9 + 16 + ... + m^2) = w^2 for some w.
2
1, 47, 2, 5, 767, 16, 1727, 22, 17, 13, 18, 112, 10, 70, 8, 10799, 12287, 21, 82, 17327, 31, 15, 255, 16, 10, 13, 9, 5, 49, 40367, 43199, 117, 17, 1630, 7, 58799, 10, 65711, 34, 73007, 49, 13, 64, 29, 17, 6, 9, 30, 42, 309, 8, 124847, 17, 31, 139967, 13, 150527, 15
OFFSET
0,2
COMMENTS
I.e., a(n) is the least solution to n^2 + (x(x+1)(2x+1)/6) = w^2; a(n) is the length of shortest sum of consecutive squares from 1 to a(n) which when added to n^2 gives a new square.
FORMULA
n^2 + (1 + 4 + 9 + ... + a(n)^2) = w^2, where w depends also on n; i.e., sum of consecutive squares from 1, 4, ... to a(n)^2 + n^2 is also a square.
EXAMPLE
n = 3: a(3) = 5 because n^2 + 1 + 4 + 9 + 16 + 25 = 9 + (1 + 4 + 9 + 16 + 25) = 64 = 8*8; n = 4: a(4) = 767 because n^2 + (1 + 4 + ... + 767^2) = 150700176 = 12276*12726, 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., at n = 93, a(n) = 415151, which means that 93^2 + A000330(415151) = 8649 + (long square sum) = 154436265^2 = 23850559947150225 is the smallest such square number, sum odd distinct consecutive squares except one repetition(8649).
MATHEMATICA
s=n^2 Do[s=s+m^2; If[IntegerQ[Sqrt[s]], Print[m]], {m, 1, 500000}] (* gives solutions of which the smallest is entered into the sequence *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 07 2001
STATUS
approved