OFFSET
3,1
COMMENTS
From Alex Ratushnyak, Mar 30 2014: (Start)
Least positive k such that n^2 + k^2 is a square.
For odd n, a(n) <= 4*triangular((n-1)/2), because n^2 + (4 * triangular((n-1)/2))^2 = ((n^2+1)/2) ^ 2, which is a perfect square since n is odd.
For n = 4*k+2, a(n) <= 8*triangular(k), because (4k+2)^2 + (4*k*(k+1))^2 = (4*k^2 + 4*k + 2)^2. (End)
LINKS
T. D. Noe, Table of n, a(n) for n = 3..1000
MATHEMATICA
Table[k = 1; While[! IntegerQ[Sqrt[n^2 + k^2]], k++]; k, {n, 3, 100}] (* T. D. Noe, Apr 02 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, May 22 2000
STATUS
approved