OFFSET
3,1
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 3..10000
FORMULA
From Robert G. Wilson v, Feb 23 2024: (Start)
sqrt(2*(n-1)) < a(n) < n^2/2.
If n = k*m, then a(n) <= k*a(m). (End)
MATHEMATICA
a[n_] := Block[{a, c, k = 1, n2 = n^2}, While[ If[ k > n, !IntegerQ[c = Sqrt[n2 + k^2]], !IntegerQ[c = Sqrt[n2 + k^2]] && !IntegerQ[a = Sqrt[n2 - k^2]]], k++; If[k == n, k++]]; If[ IntegerQ@ c, k, Sqrt[n2 - a^2]]]; (* Robert G. Wilson v, Feb 23 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, May 22 2000
STATUS
approved