Finding the Stolt fundamental solutions for x2 – Dy2 = N, D > 0 and not a perfect square, N a multiple of 4

E = 1 is verbose and prints partial and complete quotients, as well as convergents, up to the end of a period (or double period, in the case of odd period).

A note explaining the underlying algorithm is in preparation

Enter D (< 1020):
Enter N (≠ 0 and divisible by 4):
Enter E (0 or 1):

Last modified 8th March 2016
Return to main page