In mathematics, Legendre's equation is the Diophantine equation
The equation is named for Adrien-Marie Legendre who proved in 1785 that it is solvable in integers x, y, z, not all zero, if and only if-bc, -ca and -ab are quadratic residues modulo a, b and c, respectively, where a, b, c are nonzero, square-free, pairwise relatively prime integers, not all positive or all negative .