The Diophantine equation x2 = ny2 + 1, where n is a positive integer that is not a perfect square. Methods of solving such an equation have been sought from as long ago as the time of Archimedes. Bhāskara solved particular cases. Fermat apparently understood that infinitely many solutions always exist, a fact that was proved by Lagrange. The equation was mistakenly attributed to the English mathematician John Pell by Euler.