#### Finding the Stolt fundamental solutions for x^{2} – dy^{2} = n, d > 0 and not a perfect square, n a multiple of 4

The algorithm: We create a list of Nagell fundamental solutions and output a list of
Stolt fundamental solutions (SFS's) of x^{2} – dy^{2} = n, where 4 divides n and n is nonzero.
Let e_{1} = x_{1} + y_{1}√d be the least positive solution of
x^{2} – dy^{2} = 1 and e_{4} = (x_{4} + y_{4}√d)/2 be the least positive solution of x^{2} – dy^{2} = 4.

There are three possibilities: (See *On the Diophantine equation u*^{2} – Dv^{2} = 4N, Arkiv för Matematik 2 (1951), 1-23.)

- If e
_{1} = e_{4}, then the Stolt and Nagell classes are identical.
- If e
_{1} = e_{4}^{2}, each Stolt class is composed of two Nagell classes.
- If e
_{1} = e_{4}^{3}, each Stolt class is composed of three Nagell classes.

See Note.
The program is a BCMath version of BC program.

*Last modified 31st January 2020*

Return to main page