OFFSET
1,1
MATHEMATICA
f[n_, z_] := FindInstance[x > 0 && y > 0 && 6*x^2 - n*y^2 == z, {x, y}, Integers, 1]; a[n_] := For[z = 0, z <= 6, z = z + GCD[n, 6], fz = f[n, z]; If[fz =!= {}, Print["a(", n, ") = ", z, " {x, y} = ", {x, y} /. fz[[1]]]; Return[z]]]; a[49] := (Print["a(49) = ", 5, " {x, y} = ", {3, 1}]; 5); a[64] := (Print["a(64) = ", 6, " {x, y} = ", {49, 15}]; 6); a[101] := (Print["a(101) = ", 1, " {x, y} = ", {1875, 457}]; 1); Table[TimeConstrained[a[n], 300], {n, 1, 105}] (* Jean-François Alcover, Oct 10 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved