The Pellian equation is the Diophantine equation
The quadratic surd √D, however, can be converted to a continued fraction, then into a series of converging fractions yielding the Pell equation. The convergents pn∕qn are calculated from the ans, i.e., the coefficients or terms of a continued fraction (see Wikipedia for a good explanative article), and their evaluation requires a series of formulas along with P and Q which are shown on pages 261-262 of the above Theory of Numbers by Beiler. The formulas are defined in the book and are as follows:
In addition, for finding the nth convergent pn ∕qn from the previous two convergents and the as, Beiler gives the formulas:
This last equation is important since it determines whether n is the negative Pell solution (n is odd) or the regular Pell solution (n is even). In addition, when Qn+1 = 1 the Pell x,y values are located at pn,qn, respectively.
An example which he gives in the book is that of conversion of √23 into a continued fraction. The result using the formulas from above is shown in Table I:
n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|---|
Pn | 0 | 4 | 3 | 3 | 4 | 4 | 3 | 3 | 4 | 4 |
Qn | 1 | 7 | 2 | 7 | 1 | 7 | 2 | 7 | 1 | 7 |
an | 4 | 1 | 3 | 1 | 8 | 1 | 3 | 1 | 8 | 1 |
pn | 4 | 5 | 19 | 24 | 211 | 235 | 916 | 1151 | 10124 | 11275 |
qn | 1 | 1 | 4 | 5 | 44 | 49 | 191 | 240 | 2111 | 2351 |
Thus when Q5 and Q9 both equal one then p4 = 24 and q4 = 5, and p8 = 1151 and q8 = 240, respectively, fulfilling the last formula above. As can be seen only the positive Pell solutions are present since n is even.
The calculations for finding the convergents and generating a table of results using JS computer code is the purpose of this article. Note that the file is a txt file and must first be converted to an html file if one wishes to input their own Ds. A caveat, however: Errors sometime crop up when the numbers are large. Also because JS uses 64 bits for a number, very large number results are often depicted in exponential form.
We can generate a computer program that will give the above results with an even greater number of columns. The way the program is set up is as follows:
The JS computer code simplififies the calculations. For example, D=211 was given as an example on page 259 in the Bailer Book for us to try to solve. It's easy peasy with the program. It's at n=26 one less than Q27 = 1.
As a final humoristic aside the results for D=1021 by this method gives values at n=49 (the − Pell Solution) for p49 and q49 of 3.15217×1023 and 9.86500×1021, respectively. That's very close to the Avogadro number of 6.02×1023.
The values calculated by this program can be checked by searching Google books:Canon Pellianus which contains about 1000 entries. It's an old book which probably required lots of manual, tedious calculations in monklike surroundings using the very top two expressions.
This concludes Part XIII. Go back to Part XIIB.
Go back to homepage.
Copyright © 2021 by Eddie N Gutierrez. E-Mail: enaguti1949@gmail.com