Finding all solutions (primitive and imprimitive) of the diophantine equation ax2+bxy+cy2=n, where b2-4ac < 0, a > 0, n > 0.


This is a somewhat different method to the one in in L.E. Dickson's Introduction to the theory of numbers and uses a substitution due to Lagrange in 1770.
See note.
The program is a BCMath version of a BC program.

E = 1 is verbose.

Enter a (> 0):
Enter b:
Enter c:
Enter n (> 0):
Enter E (0 or 1):

Last modified 15th March 2015
Return to main page