Finding primitive solutions of the diophantine equation ax2+bxy+cy2=n, where b2-4ac > 0 and is not a perfect square, n non-zero, gcd(a,b,c)=1
If gcd(a,n)=1, the algorithm finds representatives with least positive y.
The standard method is due to Gauss (See G.B. Mathews Number Theory, page 97 or L.E. Dickson, Introduction to the theory of numbers, pages 74-75.)
E = 1 is verbose.
Last modified 27th May 2009
Return to main page