OFFSET
1,2
COMMENTS
Terms from Robert G. Wilson v.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local x, y, t, z, k, r;
if issqr(n) then return 0 fi;
t:= [isolve(n*x^2+1=y^2)];
z:= (indets(t, name) minus {x, y})[1];
for k from 0 do
r:= select(`>`, map(s -> eval(x, s), eval(t, z=k)), 0);
if nops(r) >= 1 then return min(r)^2 fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Jun 29 2018
MATHEMATICA
Do[k = 0; If[ !IntegerQ[ Sqrt[n]], k = 1; While[ !IntegerQ[ Sqrt[n*k^2 + 1]], k++ ]]; Print[k^2], {n, 1, 35}] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 02 2002
EXTENSIONS
Offset corrected by Robert Israel, Jun 29 2018
STATUS
approved