OFFSET
1,1
MATHEMATICA
sol[p_] := Solve[1 < r < s < 2 r && p == r s + s^2 && GCD[r, s] == 1, {r, s}, Integers];
Reap[For[p = 1, p <= 1000, p++, sp = sol[p]; If[sp =!= {}, Print[s^2 - r^2 /. sp[[1]]]; Sow[s^2 - r^2 /. sp[[1]]]]]][[2, 1]] (* Jean-François Alcover, Mar 07 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, May 04 2005
EXTENSIONS
Extended by Ray Chandler, May 09 2005
STATUS
approved