Math.NumberTheory.Diophantine
cornacchiaPrimitive :: Integer -> Integer -> [(Integer, Integer)] Source #
Finds all primitive solutions (x,y) to the diophantine equation | x^2 + d*y^2 = m | when 1 <= d < m and gcd(d,m)=1 | Given m is square free these are all the positive integer solutions
cornacchia :: Integer -> Integer -> [(Integer, Integer)] Source #
Finds all positive integer solutions (x,y) to the | diophantine equation: | x^2 + d*y^2 = m | when 1 <= d < m and gcd(d,m)=1