Pell's equation

Pell's equation (also called the Pell–Fermat equation) is any Diophantine equation of the form

Pell's equation for n = 2 and six of its integer solutions

where n is a given positive nonsquare integer and integer solutions are sought for x and y. In Cartesian coordinates, the equation has the form of a hyperbola; solutions occur wherever the curve passes through a point whose x and y coordinates are both integers, such as the trivial solution with x = 1 and y = 0. Joseph Louis Lagrange proved that, as long as n is not a perfect square, Pell's equation has infinitely many distinct integer solutions. These solutions may be used to accurately approximate the square root of n by rational numbers of the form x/y.

This equation was first studied extensively in India, starting with Brahmagupta, who found an integer solution to in his Brāhmasphuṭasiddhānta in 628.[1] Bhaskara II in the twelfth century and Narayana Pandit in the fourteenth century both found general solutions to Pell's equation and other quadratic indeterminate equations. Bhaskara II is generally credited with developing the chakravala method, building on the work of Jayadeva and Brahmagupta. Solutions to specific examples of Pell's equation, such as the Pell numbers arising from the equation with n = 2, had been known for much longer, since the time of Pythagoras in Greece and a similar date in India. The name of Pell's equation arose from Leonhard Euler mistakenly attributing Lord Brouncker's solution of the equation to John Pell.[2][note 1]

History

As early as 400 BC in India and Greece, mathematicians studied the numbers arising from the n = 2 case of Pell's equation,

and from the closely related equation

because of the connection of these equations to the square root of 2.[3] Indeed, if x and y are positive integers satisfying this equation, then x/y is an approximation of 2. The numbers x and y appearing in these approximations, called side and diameter numbers, were known to the Pythagoreans, and Proclus observed that in the opposite direction these numbers obeyed one of these two equations.[3] Similarly, Baudhayana discovered that x = 17, y = 12 and x = 577, y = 408 are two solutions to the Pell equation, and that 17/12 and 577/408 are very close approximations to the square root of 2.

Later, Archimedes approximated the square root of 3 by the rational number 1351/780. Although he did not explain his methods, this approximation may be obtained in the same way, as a solution to Pell's equation.[3] Archimedes's cattle problem involves solving a Pellian equation. It is now generally accepted that this problem is due to Archimedes.[4][5]

Around AD 250, Diophantus considered the equation

where a and c are fixed numbers and x and y are the variables to be solved for. This equation is different in form from Pell's equation but equivalent to it. Diophantus solved the equation for (a, c) equal to (1, 1), (1, −1), (1, 12), and (3, 9). Al-Karaji, a 10th-century Persian mathematician, worked on similar problems to Diophantus.

In Indian mathematics, Brahmagupta discovered that

(see Brahmagupta's identity). Using this, he was able to "compose" triples and that were solutions of , to generate the new triples

and

Not only did this give a way to generate infinitely many solutions to starting with one solution, but also, by dividing such a composition by , integer or "nearly integer" solutions could often be obtained. For instance, for , Brahmagupta composed the triple (10, 1, 8) (since ) with itself to get the new triple (192, 20, 64). Dividing throughout by 64 ('8' for and ) gave the triple (24, 5/2, 1), which when composed with itself gave the desired integer solution (1151, 120, 1). Brahmagupta solved many Pell equations with this method; in particular he showed how to obtain solutions starting from an integer solution of for k = ±1, ±2, or ±4.[6]

The first general method for solving the Pell equation (for all N) was given by Bhāskara II in 1150, extending the methods of Brahmagupta. Called the chakravala (cyclic) method, it starts by choosing two relatively prime integers and , then composing the triple (that is, one which satisfies ) with the trivial triple to get the triple , which can be scaled down to

When is chosen so that is an integer, so are the other two numbers in the triple. Among such , the method chooses one that minimizes , and repeats the process. This method always terminates with a solution (proved by Joseph-Louis Lagrange in 1768). Bhaskara used it to give the solution x = 1766319049, y = 226153980 to the notorious N = 61 case.[6]

Several European mathematicians rediscovered how to solve Pell's equation in the 17th century, apparently unaware that it had been solved almost five hundred years earlier in India. Pierre de Fermat found how to solve the equation and in a 1657 letter issued it as a challenge to English mathematicians.[7] In a letter to Kenelm Digby, Bernard Frénicle de Bessy said that Fermat found the smallest solution for N up to 150, and challenged John Wallis to solve the cases N = 151 or 313. Both Wallis and William Brouncker gave solutions to these problems, though Wallis suggests in a letter that the solution was due to Brouncker.[8]

John Pell's connection with the equation is that he revised Thomas Branker's translation (Rahn 1668) of Johann Rahn's 1659 book "Teutsche Algebra"[note 2] into English, with a discussion of Brouncker's solution of the equation. Leonhard Euler mistakenly thought that this solution was due to Pell, as a result of which he named the equation after Pell.

The general theory of Pell's equation, based on continued fractions and algebraic manipulations with numbers of the form was developed by Lagrange in 1766–1769.[9]

Solutions

Fundamental solution via continued fractions

Let denote the sequence of convergents to the regular continued fraction for . This sequence is unique. Then the pair (x1,y1) solving Pell's equation and minimizing x satisfies x1 = hi and y1 = ki for some i. This pair is called the fundamental solution. Thus, the fundamental solution may be found by performing the continued fraction expansion and testing each successive convergent until a solution to Pell's equation is found.

As Lenstra (2002) describes, the time for finding the fundamental solution using the continued fraction method, with the aid of the Schönhage–Strassen algorithm for fast integer multiplication, is within a logarithmic factor of the solution size, the number of digits in the pair (x1,y1). However, this is not a polynomial time algorithm because the number of digits in the solution may be as large as n, far larger than a polynomial in the number of digits in the input value n (Lenstra 2002).

Additional solutions from the fundamental solution

Once the fundamental solution is found, all remaining solutions may be calculated algebraically from

expanding the right side, equating coefficients of on both sides, and equating the other terms on both sides. This yields the recurrence relations

Concise representation and faster algorithms

Although writing out the fundamental solution (x1, y1) as a pair of binary numbers may require a large number of bits, it may in many cases be represented more compactly in the form

using much smaller integers ai, bi, and ci.

For instance, Archimedes' cattle problem is equivalent to the Pell equation , the fundamental solution of which has 206545 digits if written out explicitly. However, the solution is also equal to

where

and and only have 45 and 41 decimal digits, respectively.[10]

Methods related to the quadratic sieve approach for integer factorization may be used to collect relations between prime numbers in the number field generated by n, and to combine these relations to find a product representation of this type. The resulting algorithm for solving Pell's equation is more efficient than the continued fraction method, though it still takes more than polynomial time. Under the assumption of the generalized Riemann hypothesis, it can be shown to take time

where N = log n is the input size, similarly to the quadratic sieve (Lenstra 2002).

Quantum algorithms

Hallgren (2007) showed that a quantum computer can find a product representation, as described above, for the solution to Pell's equation in polynomial time. Hallgren's algorithm, which can be interpreted as an algorithm for finding the group of units of a real quadratic number field, was extended to more general fields by Schmidt & Völlmer (2005).

Example

As an example, consider the instance of Pell's equation for n = 7; that is,

The sequence of convergents for the square root of seven are

h / k (Convergent) h2 −7k2 (Pell-type approximation)
2 / 1 −3
3 / 1 +2
5 / 2 −3
8 / 3 +1

Therefore, the fundamental solution is formed by the pair (8, 3). Applying the recurrence formula to this solution generates the infinite sequence of solutions

(1, 0); (8, 3); (127, 48); (2024, 765); (32257, 12192); (514088, 194307); (8193151, 3096720); (130576328, 49353213); ... (sequence A001081 (x) and A001080 (y) in OEIS)

The smallest solution can be very large. For example, the smallest solution to is (32188120829134849, 1819380158564160), and this is the equation which Frenicle challenged Wallis to solve.[11] Values of n such that the smallest solution of is greater than the smallest solution for any smaller value of n are

1, 2, 5, 10, 13, 29, 46, 53, 61, 109, 181, 277, 397, 409, 421, 541, 661, 1021, 1069, 1381, 1549, 1621, 2389, 3061, 3469, 4621, 4789, 4909, 5581, 6301, 6829, 8269, 8941, 9949, ... (sequence A033316 in the OEIS)

(For these records, see OEIS: A033315 (x), and OEIS: A033319 (y)).

The smallest solution of Pell equations

The following is a list of the smallest solution to with n ≤ 128. For square n, there is no solution except (1, 0). (sequence A002350 (x) and A002349 (y) in OEIS, or OEIS: A033313 (x) and OEIS: A033317 (y) (for nonsquare n))

nxy
1 --
2 32
3 21
4 --
5 94
6 52
7 83
8 31
9 --
10 196
11 103
12 72
13 649180
14 154
15 41
16 --
17 338
18 174
19 17039
20 92
21 5512
22 19742
23 245
24 51
25 --
26 5110
27 265
28 12724
29 98011820
30 112
31 1520273
32 173
nxy
33 234
34 356
35 61
36 --
37 7312
38 376
39 254
40 193
41 2049320
42 132
43 3482531
44 19930
45 16124
46 243353588
47 487
48 71
49 --
50 9914
51 507
52 64990
53 662499100
54 48566
55 8912
56 152
57 15120
58 196032574
59 53069
60 314
61 1766319049226153980
62 638
63 81
64 --
nxy
65 12916
66 658
67 488425967
68 334
69 7775936
70 25130
71 3480413
72 172
73 2281249267000
74 3699430
75 263
76 577996630
77 35140
78 536
79 809
80 91
81 --
82 16318
83 829
84 556
85 28576930996
86 104051122
87 283
88 19721
89 50000153000
90 192
91 1574165
92 1151120
93 121511260
94 2143295221064
95 394
96 495
nxy
97 628096336377352
98 9910
99 101
100 --
101 20120
102 10110
103 22752822419
104 515
105 414
106 320800513115890
107 96293
108 1351130
109 15807067198624915140424455100
110 212
111 29528
112 12712
113 1204353113296
114 102596
115 1126105
116 9801910
117 64960
118 30691728254
119 12011
120 111
121 --
122 24322
123 12211
124 4620799414960
125 93024983204
126 44940
127 4730624419775
128 57751

Connections

Pell's equation has connections to several other important subjects in mathematics.

Algebraic number theory

Pell's equation is closely related to the theory of algebraic numbers, as the formula

is the norm for the ring and for the closely related quadratic field . Thus, a pair of integers solves Pell's equation if and only if is a unit with norm 1 in . Dirichlet's unit theorem, that all units of can be expressed as powers of a single fundamental unit (and multiplication by a sign), is an algebraic restatement of the fact that all solutions to the Pell equation can be generated from the fundamental solution. The fundamental unit can in general be found by solving a Pell-like equation but it does not always correspond directly to the fundamental solution of Pell's equation itself, because the fundamental unit may have norm −1 rather than 1 and its coefficients may be half integers rather than integers.

Chebyshev polynomials

Demeyer (2007) mentions a connection between Pell's equation and the Chebyshev polynomials: If Ti (x) and Ui (x) are the Chebyshev polynomials of the first and second kind, respectively, then these polynomials satisfy a form of Pell's equation in any polynomial ring R[x], with n = x2  1:

Thus, these polynomials can be generated by the standard technique for Pell equations of taking powers of a fundamental solution:

It may further be observed that, if (xi,yi) are the solutions to any integer Pell equation, then xi = Ti (x1) and yi = y1Ui  1(x1) (Barbeau, chapter 3).

Continued fractions

A general development of solutions of Pell's equation in terms of continued fractions of can be presented, as the solutions x and y are approximates to the square root of n and thus are a special case of continued fraction approximations for quadratic irrationals.

The relationship to the continued fractions implies that the solutions to Pell's equation form a semigroup subset of the modular group. Thus, for example, if p and q satisfy Pell's equation, then

is a matrix of unit determinant. Products of such matrices take exactly the same form, and thus all such products yield solutions to Pell's equation. This can be understood in part to arise from the fact that successive convergents of a continued fraction share the same property: If pk−1/qk−1 and pk/qk are two successive convergents of a continued fraction, then the matrix

has determinant (−1)k.

Størmer's theorem applies Pell equations to find pairs of consecutive smooth numbers. As part of this theory, Størmer also investigated divisibility relations among solutions to Pell's equation; in particular, he showed that each solution other than the fundamental solution has a prime factor that does not divide n.

As Lenstra (2002) describes, Pell's equation can also be used to solve Archimedes' cattle problem.

The negative Pell equation

The negative Pell equation is given by

It has also been extensively studied; it can be solved by the same method of continued fractions and will have solutions if and only if the period of the continued fraction has odd length. However it is not known which roots have odd period lengths and therefore not known when the negative Pell equation is solvable. A necessary (but not sufficient) condition for solvability is that n is not divisible by 4 or by a prime of form 4k + 3.[note 3] Thus, for example, x2  3ny2 = −1 is never solvable, but x2  5ny2 = −1 may be.

The first few numbers n for which x2  ny2 = −1 is solvable are

1, 2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, ... (sequence A031396 in the OEIS).

Cremona & Odoni (1989) demonstrate that the proportion of square-free n divisible by k primes of the form 4m + 1 for which the negative Pell equation is solvable is at least 40%. If the negative Pell equation does have a solution for a particular n, its fundamental solution leads to the fundamental one for the positive case by squaring both sides of the defining equation:

implies

Transformations

The related equation

(*)

can be used to find solutions to the positive Pell equation for certain d. Legendre proved that all primes of form d = 4m + 3 solve one case of (*), with the form 8m + 3 solving the negative, and 8m + 7 for the positive. Their fundamental solution then leads to the one for x2dy2 = 1. This can be shown by squaring both sides of (*)

to get

Since from (*), it follows that

and so the fundamental solutions to (*) are smaller than those of the associated negative Pell equation. For example, u2-3v2 = -2 is {u,v} = {1, 1}, so x2  3y2 = 1 has {x,y} = {2, 1}. On the other hand, u2  7v2 = 2 is {u,v} = {3,1}, so x2  7y2 = 1 has {x,y} = {8,3}.

Another related equation,

can also be used to find solutions to Pell equations for certain d, this time for the positive and negative case. For the following transformations,[12] if fundamental {u,v} are both odd, then it leads to fundamental {x,y}.

1. If u2  dv2 = −4, and {x,y} = {(u2 + 3)u/2, (u2 + 1)v/2}, then x2  dy2 = −1.

Ex. Let d = 13, then {u,v} = {3, 1} and {x,y} = {18, 5}.

2. If u2  dv2 = 4, and {x,y} = {(u2  3)u/2, (u2  1)v/2}, then x2  dy2 = 1.

Ex. Let d = 13, then {u,v} = {11, 3} and {x,y} = {649, 180}.

3. If u2  dv2 = −4, and {x,y} = {(u4 + 4u2 + 1)(u2 + 2)/2, (u2 + 3)(u2 + 1)uv/2}, then x2  dy2 = 1.

Ex. Let d = 61, then {u,v} = {39, 5} and {x,y} = {1766319049, 226153980}.

Especially for the last transformation, it can be seen how solutions to {u,v} are much smaller than {x,y}, since the latter are sextic and quintic polynomials in terms of u.

Notes

  1. In Euler's Vollständige Anleitung zur Algebra (pp. 227 ff), he presents a solution to Pell's equation which was taken from John Wallis' Commercium epistolicum, specifically, Letter 17 (Epistola XVII) and Letter 19 (Epistola XIX) of:
    • Wallis, John, ed. (1658). Commercium epistolicum, de Quaestionibus quibusdam Mathematicis nuper habitum [Correspondence, about some mathematical inquiries recently undertaken] (in English, Latin, and French). Oxford, England: A. Lichfield. The letters are in Latin. Letter 17 appears on pp. 56–72. Letter 19 appears on pp. 81–91.
    • French translations of Wallis' letters: Fermat, Pierre de (1896). Tannery, Paul; Henry, Charles (eds.). Oeuvres de Fermat (in French and Latin). 3rd vol. Paris, France: Gauthier-Villars et fils. Letter 17 appears on pp. 457–480. Letter 19 appears on pp. 490–503.
    Wallis' letters showing a solution to the Pell's equation also appear in volume 2 of Wallis' Opera mathematica (1693), which includes articles by John Pell:
    • Wallis, John (1693). Opera mathematica: de Algebra Tractatus; Historicus & Practicus [Mathematical works: Treatise on Algebra; historical and as presently practiced] (in Latin, English, and French). 2nd vol. Oxford, England. Letter 17 is on pp. 789–798; letter 19 is on pp. 802–806. See also Pell's articles, where Wallis mentions (pp. 235, 236, 244) that Pell's methods are applicable to the solution of Diophantine equations:
    • De Algebra D. Johannis Pellii; & speciatim de Problematis imperfecte determinatis. (On Algebra by Dr. John Pell and especially on an incompletely determined problem), pp. 234–236.
    • Methodi Pellianae Specimen. (Example of Pell's method), pp. 238–244.
    • Specimen aliud Methodi Pellianae. (Another example of Pell's method), pp. 244–246.
    See also:
  2. "Teutsch" is a now obsolete referral to the German language, and here also to the, considered genuine, German culture area. Free E-book: Teutsche Algebra (Google Books)
  3. This is because the Pell equation implies that −1 is a quadratic residue modulo n.

References

  1. Dunham, William. "Number theory - Number theory in the East". Encyclopedia Britannica. Retrieved 4 January 2020.
  2. As early as 1732–1733 Euler believed that John Pell had developed a method to solve Pell's equation, even though Euler knew that Wallis had developed a method to solve it (although William Brouncker had actually done most of the work):
    • Euler, Leonard (1732–1733). "De solutione problematum Diophantaeorum per numeros integros" [On the solution of Diophantine problems by integers]. Commentarii Academiae Scientiarum Imperialis Petropolitanae (Memoirs of the Imperial Academy of Sciences at St. Petersburg). 6: 175–188. From p. 182: "At si a huiusmodi fuerit numerus, qui nullo modo ad illas formulas potest reduci, peculiaris ad invenienda p et q adhibenda est methodus, qua olim iam usi sunt Pellius et Fermatius." (But if such an a be a number that can be reduced in no way to these formulas, the specific method for finding p and q is applied which Pell and Fermat have used for some time now.) From p. 183: "§. 19. Methodus haec extat descripta in operibus Wallisii, et hanc ob rem eam hic fusius non-expono." (§. 19. This method exists described in the works of Wallis, and for this reason I do not present it here in more detail.)
    • Lettre IX. Euler à Goldbach, dated 10 August 1750 in: Fuss, P.H., ed. (1843). Correspondance Mathématique et Physique de Quelques Célèbres Géomètres du XVIIIeme Siècle … [Mathematical and physical correspondence of some famous geometers of the 18th century …] (in French, Latin, and German). St. Petersburg, Russia. p. 37. From page 37: "Pro hujusmodi quaestionibus solvendis excogitavit D. Pell Anglus peculiarem methodum in Wallisii operibus expositam." (For solving such questions, the Englishman Dr. Pell devised a singular method [which is] shown in Wallis' works.)
    • Euler, Leonard (1771). Vollständige Anleitung zur Algebra, II. Theil [Complete Introduction to Algebra, Part 2] (in German). Kayserlichen Akademie der Wissenschaften (Imperial Academy of Sciences): St. Petersburg, Russia. p. 227. From p. 227: "§98. Hierzu hat vormals ein gelehrter Engländer, Namens Pell, eine ganz sinnreiche Methode erfunden, welche wir hier erklären wollen." (§.98 Concerning this, a learned Englishman by the name of Pell has previously found a quite ingenious method, which we will explain here.)
    • English translation: Euler, Leonard (1810). Elements of Algebra …. 2nd vol. (2nd ed.). London, England: J. Johnson. p. 78.
    • Heath, Thomas L. (1910). Diophantus of Alexandria : A Study in the History of Greek Algebra. Cambridge, England: Cambridge University Press. p. 286. See especially footnote 4.
  3. Knorr, Wilbur R. (1976), "Archimedes and the measurement of the circle: a new interpretation", Archive for History of Exact Sciences, 15 (2): 115–140, doi:10.1007/bf00348496, MR 0497462.
  4. Fraser, Peter M. (1972). Ptolemaic Alexandria. Oxford University Press.
  5. Weil, André (1972). Number Theory, an Approach Through History. Birkhäuser.
  6. John Stillwell (2002), Mathematics and its history (2nd ed.), Springer, pp. 72–76, ISBN 978-0-387-95336-6
  7. In February 1657, Pierre de Fermat wrote two letters about Pell's equation. One letter (in French) was addressed to Bernard Frénicle de Bessy, and the other (in Latin) was addressed to Kenelm Digby, whom it reached via Thomas White and then William Brouncker.
    • Fermat, Pierre de (1894). Tannery, Paul; Henry, Charles (eds.). Oeuvres de Fermat (in French and Latin). 2nd vol. Paris, France: Gauthier-Villars et fils. pp. 333–335. The letter to Frénicle appears on pp. 333–334; the letter to Digby, on pp. 334–335.
    The letter in Latin to Digby is translated into French in:
    • Fermat, Pierre de (1896). Tannery, Paul; Henry, Charles (eds.). Oeuvres de Fermat (in French and Latin). 3rd vol. Paris, France: Gauthier-Villars et fils. pp. 312–313.
    Both letters are translated (in part) into English in:
  8. In January 1658, at the end of Epistola XIX (letter 19), Wallis effusively congratulated Brouncker for his victory in a battle of wits against Fermat regarding the solution of Pell's equation. From p. 807 of (Wallis, 1693): "Et quidem cum Vir Nobilissimus, utut hac sibi suisque tam peculiaria putaverit, & altis impervia, (quippe non omnis fert omnia tellus) ut ab Anglis haud speraverit solutionem; profiteatur tamen qu'il sera pourtant ravi d'estre destrompé par cet ingenieux & scavant Signieur; erit cur & ipse tibi gratuletur. Me quod attinet, humillimas est quod rependam gratias, quod in Victoriae tuae partem advocare dignatus es, … " (And indeed, Most Noble Sir [i.e., Viscount Brouncker], he [i.e., Fermat] might have thought [to have] all to himself such an esoteric [subject, i.e., Pell's equation] with its impenetrable profundities (for all land does not bear all things [i.e., not every nation can excel in everything]), so that he might hardly have expected a solution from the English; nevertheless, he avows that he will, however, be thrilled to be disabused by this ingenious and learned Lord [i.e., Brouncker]; it will be for that reason that he [i.e., Fermat] himself would congratulate you. Regarding myself, I requite with humble thanks your having deigned to call upon me to take part in your Victory, … ) [Note: The date at the end of Wallis' letter is "Jan. 20. 1657"; however, that date was according to the old Julian calendar; when Britain finally adopted the Gregorian calendar in 1751, that date became January 30, 1658.]
  9. "Solution d'un Problème d'Arithmétique", in Joseph Alfred Serret (Ed.), Œuvres de Lagrange, vol. 1, pp. 671–731, 1867.
  10. (Lenstra 2002)
  11. Prime Curios!: 313
  12. A Collection of Algebraic Identities: Pell Equations.

Bibliography

Further reading

  • Williams, H. C. (2002). "Solving the Pell equation". In Bennett, M. A.; Berndt, B.C.; Boston, N.; Diamond, H.G.; Hildebrand, A.J.; Philipp, W. (eds.). Surveys in number theory: Papers from the millennial conference on number theory. Natick, MA: A K Peters. pp. 325–363. ISBN 1-56881-162-4. Zbl 1043.11027.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.