OFFSET
1,6
EXAMPLE
Array begins:
0, 1, 1, 0, 1, ...
1, 0, 2, 2, 2, ...
2, 1, 0, 3, 3, ...
0, 2, 1, 0, 4, ...
1, 2, 2, 1, 0, ...
...
MATHEMATICA
f[p_, q_, z_] := FindInstance[x > 0 && y > 0 && p*x^2 - q*y^2 == z, {x, y}, Integers, 1]; a[p_, q_] := For[z = 0, True, z = z + GCD[p, q], fz = f[p, q, z]; If[fz =!= {}, Print["a(", p, " ", q, ") = ", z, " {x, y} = ", {x, y} /. fz[[1]]]; Return[z]]]; Table[TimeConstrained[a[p - q + 1, q], 300], {p, 1, 14}, {q, p, 1, -1}] // Flatten (* Jean-François Alcover, Oct 10 2016 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved