Cohn, J. H. E. “Squares in Arithmetical Progressions I”. MATHEMATICA SCANDINAVICA, vol. 52, Dec. 1983, pp. 5-19, doi:10.7146/math.scand.a-11988.