On the negative Pell equation
É. Fouvry, J. Klüners, Annals of Mathematics 172 (2010) 2035–2104.