OFFSET
1,3
MATHEMATICA
f[n_, z_] := FindInstance[x > 0 && y > 0 && n*x^2 - y^2 == z, {x, y}, Integers, 1]; a[n_] := For[z = 0, True, z++, fz = f[n, z]; If[fz =!= {}, Print["a(", n, ") = ", z, " {x, y} = ", {x, y} /. fz[[1]]]; Return[z]]]; Array[a, 97] (* Jean-François Alcover, Oct 11 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved