Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Pell's equation
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Type of Diophantine equation}} {{good article}} {{Use dmy dates|date=October 2019}} [[File:Pell's equation.svg|thumb|360px|Pell's equation for ''n'' = 2 and six of its integer solutions]] '''Pell's equation''', also called the '''Pell–Fermat equation''', is any [[Diophantine equation]] of the form <math>x^2 - ny^2 = 1,</math> where ''n'' is a given positive [[Square number|nonsquare]] [[integer]], and integer solutions are sought for ''x'' and ''y''. In [[Cartesian coordinates]], the equation is represented by a [[hyperbola]]; solutions occur wherever the curve passes through a point whose ''x'' and ''y'' coordinates are both integers, such as the [[Triviality (mathematics)|trivial solution]] with ''x'' = 1 and ''y'' = 0. [[Joseph Louis Lagrange]] proved that, as long as ''n'' is not a [[square number|perfect square]], Pell's equation has infinitely many distinct integer solutions. These solutions may be used to accurately [[Diophantine approximation|approximate]] the [[square root]] of ''n'' by [[rational number]]s of the form ''x''/''y''. This equation was first studied extensively [[Indian mathematics|in India]] starting with [[Brahmagupta]],<ref>{{Cite web |last1=O'Connor |first1=J. J. |last2=Robertson |first2=E. F. |date=February 2002 |title=Pell's Equation |url=https://mathshistory.st-andrews.ac.uk/HistTopics/Pell/ |access-date=13 July 2020 |website=School of Mathematics and Statistics, University of St Andrews, Scotland}}</ref> who found an integer solution to <math>92x^2 + 1 = y^2</math> in his ''[[Brāhmasphuṭasiddhānta]]'' circa 628.<ref>{{Cite web |url=https://www.britannica.com/science/number-theory |title=Number theory – Number theory in the East |last=Dunham |first=William |website=Encyclopedia Britannica |language=en |access-date=2020-01-04}}</ref> [[Bhāskara II|Bhaskara II]] in the 12th century and [[Narayana Pandit]] in the 14th century both found general solutions to Pell's equation and other quadratic indeterminate equations. Bhaskara II is generally credited with developing the [[chakravala method|''chakravala'' method]], building on the work of [[Jayadeva (mathematician)|Jayadeva]] and Brahmagupta. Solutions to specific examples of Pell's equation, such as the [[Pell number]]s arising from the equation with ''n'' = 2, had been known for much longer, since the time of [[Pythagoras]] in [[Greek mathematics|Greece]] and a similar date in India. [[William Brouncker, 2nd Viscount Brouncker|William Brouncker]] was the first European to solve Pell's equation. The name of Pell's equation arose from [[Leonhard Euler]] mistakenly attributing Brouncker's solution of the equation to [[John Pell (mathematician)|John Pell]].<ref>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): * {{cite journal |last1=Euler |first1=Leonhard |author-link=Leonhard Euler |title=De solutione problematum Diophantaeorum per numeros integros |language=la |journal=Commentarii Academiae Scientiarum Imperialis Petropolitanae (Memoirs of the Imperial Academy of Sciences at St. Petersburg) |date=1732–1733 |volume=6 |pages=175–188 |url=https://babel.hathitrust.org/cgi/pt?id=mdp.39015065400890;view=1up;seq=185 |trans-title=On the solution of Diophantine problems by integers}} 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: {{cite book |editor1-last=Fuss |editor1-first=P. H. |title=Correspondance Mathématique et Physique de Quelques Célèbres Géomètres du XVIIIeme Siècle ... |trans-title=Mathematical and physical correspondence of some famous geometers of the 18th century ... |date=1843 |location=St. Petersburg, Russia |page=37 |url=https://books.google.com/books?id=gf1OEXIQQgsC&pg=PA37 |language=fr, la, de}} From page 37: {{lang|la|"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.) * {{cite book |last1=Euler |first1=Leonhard |title=Vollständige Anleitung zur Algebra, II. Theil |trans-title=Complete Introduction to Algebra, Part 2 |date=1771 |publisher=St. Petersburg, Russia |location=Kayserlichen Akademie der Wissenschaften (Imperial Academy of Sciences) |page=227 |url=https://archive.org/stream/bub_gb_nfYGAAAAcAAJ#page/n503 |language=de}} From p. 227: {{lang|de|"§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: {{cite book |last1=Euler |first1=Leonhard |title=Elements of Algebra ... |date=1810 |publisher=J. Johnson |location=London, England |page=78 |edition=2nd |volume=2 |url=https://books.google.com/books?id=mqI-AAAAYAAJ&pg=PA78}} * {{cite book |last1=Heath |first1=Thomas L. |title=Diophantus of Alexandria : A Study in the History of Greek Algebra |date=1910 |publisher=Cambridge University Press |location=Cambridge, England |page=286 |url=https://archive.org/stream/diophantusofalex00heatiala#page/286 }} See especially footnote 4.</ref><ref name=":1" /><ref group=note>In Euler's {{lang|de|Vollständige Anleitung zur Algebra}} (pp. 227ff), he presents a solution to Pell's equation which was taken from John Wallis' {{lang|la|Commercium epistolicum}}, specifically, Letter 17 ({{lang|la|Epistola XVII}}) and Letter 19 ({{lang|la|Epistola XIX}}) of: * {{cite book |editor1-last=Wallis |editor1-first=John |title=Commercium epistolicum, de Quaestionibus quibusdam Mathematicis nuper habitum. |trans-title=Correspondence, about some mathematical inquiries recently undertaken |date=1658 |publisher=A. Lichfield |location=Oxford, England |url=https://books.google.com/books?id=RqFGAAAAcAAJ&pg=PA56 |language=en, la, fr}} The letters are in Latin. Letter 17 appears on pp. 56–72. Letter 19 appears on pp. 81–91. * French translations of Wallis' letters: {{cite book |last1=Fermat |first1=Pierre de |editor1-last=Tannery |editor1-first=Paul |editor2-last=Henry |editor2-first=Charles |title=Oeuvres de Fermat |date=1896 |publisher=Gauthier-Villars et fils |location=Paris, France |volume=3 |url=https://www.biodiversitylibrary.org/item/62740#page/479/mode/1up |language=fr, la}} 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' {{lang|la|Opera mathematica}} (1693), which includes articles by John Pell: * {{cite book |last1=Wallis |first1=John |title=Opera mathematica: de Algebra Tractatus; Historicus & Practicus |trans-title=Mathematical works: Treatise on Algebra; historical and as presently practiced |volume=2 |date=1693 |location=Oxford, England |url=https://books.google.com/books?id=_6nstlHZzaEC&pg=PP15 |language=la, en, fr}} 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: :* {{lang|la|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. :* {{lang|la|Methodi Pellianae Specimen}} (Example of Pell's method), pp. 238–244. :* {{lang|la|Specimen aliud Methodi Pellianae}} (Another example of Pell's method), pp. 244–246. See also: * Whitford, Edward Everett (1912) "The Pell equation", doctoral thesis, Columbia University (New York, New York, USA), [https://archive.org/stream/pellequation00whitgoog#page/n63 p. 52]. * {{cite book |last1=Heath |first1=Thomas L. |title=Diophantus of Alexandria : A Study in the History of Greek Algebra |date=1910 |publisher=Cambridge University Press |location=Cambridge, England |page=286 |url=https://archive.org/stream/diophantusofalex00heatiala#page/286 }}</ref> ==History== As early as 400 BC in [[India]] and [[Greece]], mathematicians studied the numbers arising from the ''n'' = 2 case of Pell's equation, <math display="block">x^2 - 2 y^2 = 1,</math> and from the closely related equation <math display="block">x^2 - 2 y^2 = -1</math> because of the connection of these equations to the [[square root of 2]].<ref name="knorr76"/> Indeed, if ''x'' and ''y'' are [[Natural number|positive integers]] satisfying this equation, then ''x''/''y'' is an approximation of {{math|{{sqrt|2}}}}. The numbers ''x'' and ''y'' appearing in these approximations, called [[Pell number|side and diameter numbers]], were known to the [[Pythagoreanism|Pythagoreans]], and [[Proclus]] observed that in the opposite direction these numbers obeyed one of these two equations.<ref name="knorr76"/> 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.<ref>{{MacTutor Biography|id=Baudhayana|title=Baudhayana}}</ref> 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.<ref name="knorr76">{{citation | last = Knorr | first = Wilbur R. | author-link = Wilbur Knorr | issue = 2 | journal = Archive for History of Exact Sciences | mr = 0497462 | pages = 115–140 | title = Archimedes and the measurement of the circle: a new interpretation | volume = 15 | year = 1976 | doi=10.1007/bf00348496 | s2cid = 120954547 }}.</ref> Likewise, [[Archimedes's cattle problem]] — an ancient [[Word problem (mathematics education)|word problem]] about finding the number of cattle belonging to the sun god [[Helios]] — can be solved by reformulating it as a Pell's equation. The manuscript containing the problem states that it was devised by Archimedes and recorded in a letter to [[Eratosthenes]],<ref>{{cite journal |doi= 10.2307/2589706 |last= Vardi |first= I. |title= Archimedes' Cattle Problem |journal=[[American Mathematical Monthly]] |year= 1998 |volume= 105 |pages=305–319 | issue= 4 |publisher= Mathematical Association of America |jstor= 2589706 |citeseerx= 10.1.1.33.4288 }}</ref> and the attribution to Archimedes is generally accepted today.<ref>{{cite book |title=Ptolemaic Alexandria |first=Peter M. |last=Fraser |author-link=Peter Fraser (classicist) |publisher=Oxford University Press |year=1972}}</ref><ref>{{cite book |title=Number Theory, an Approach Through History |first=André |last=Weil |author-link=André Weil |publisher=Birkhäuser |year=1972}}</ref> Around AD 250, [[Diophantus]] considered the equation <math display="block">a^2 x^2 + c = y^2,</math> 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.<ref>{{Cite journal |last=Izadi |first=Farzali |date=2015 |title=Congruent numbers via the Pell equation and its analogous counterpart |url=http://www.nntdm.net/papers/nntdm-21/NNTDM-21-1-70-78.pdf |journal=Notes on Number Theory and Discrete Mathematics |volume=21 |pages=70–78}}</ref> In Indian mathematics, [[Brahmagupta]] discovered that <math display="block">(x_1^2 - Ny_1^2)(x_2^2 - Ny_2^2) = (x_1x_2 + Ny_1y_2)^2 - N(x_1y_2 + x_2y_1)^2,</math> a form of what is now known as [[Brahmagupta's identity]]. Using this, he was able to "compose" triples <math>(x_1, y_1, k_1)</math> and <math>(x_2, y_2, k_2)</math> that were solutions of <math>x^2 - Ny^2 = k</math>, to generate the new triples : <math>(x_1x_2 + Ny_1y_2 , x_1y_2 + x_2y_1 , k_1k_2)</math> and <math>(x_1x_2 - Ny_1y_2 , x_1y_2 - x_2y_1 , k_1k_2).</math> Not only did this give a way to generate infinitely many solutions to <math>x^2 - Ny^2 = 1</math> starting with one solution, but also, by dividing such a composition by <math>k_1k_2</math>, integer or "nearly integer" solutions could often be obtained. For instance, for <math>N = 92</math>, Brahmagupta composed the triple (10, 1, 8) (since <math>10^2 - 92(1^2) = 8</math>) with itself to get the new triple (192, 20, 64). Dividing throughout by 64 ("8" for <math>x</math> and <math>y</math>) gave the triple (24, 5/2, 1), which when composed with itself gave the desired integer solution (1151, 120, 1). Brahmagupta solved many Pell's equations with this method, proving that it gives solutions starting from an integer solution of <math>x^2 - Ny^2 = k</math> for ''k'' = ±1, ±2, or ±4.<ref name=stillwell>{{citation | year=2002 | title = Mathematics and its history | author-link1=John Stillwell | author1=John Stillwell | edition=2nd | publisher=Springer | isbn=978-0-387-95336-6 | pages=72–76 | url=https://books.google.com/books?id=WNjRrqTm62QC&pg=PA72}}.</ref> The first general method for solving the Pell's equation (for all ''N'') was given by [[Bhāskara II]] in 1150, extending the methods of Brahmagupta. Called the [[chakravala method|chakravala (cyclic) method]], it starts by choosing two relatively prime integers <math>a</math> and <math>b</math>, then composing the triple <math>(a, b, k)</math> (that is, one which satisfies <math>a^2 - Nb^2 = k</math>) with the trivial triple <math>(m, 1, m^2 - N)</math> to get the triple <math>\big(am + Nb, a + bm, k(m^2 - N)\big)</math>, which can be scaled down to <math display="block">\left(\frac{am + Nb}{k}, \frac{a + bm}{k}, \frac{m^2 - N}{k}\right).</math> When <math>m</math> is chosen so that <math>\frac{a + bm}{k}</math> is an integer, so are the other two numbers in the triple. Among such <math>m</math>, the method chooses one that minimizes <math>\frac{m^2 - N}{k}</math> and repeats the process. This method always terminates with a solution. Bhaskara used it to give the solution ''x'' = {{val|1766319049}}, ''y'' = {{val|226153980}} to the ''N'' = 61 case.<ref name=stillwell/> Several European mathematicians rediscovered how to solve Pell's equation in the 17th century. [[Pierre de Fermat]] found how to solve the equation and in a 1657 letter issued it as a challenge to English mathematicians.<ref>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. * {{cite book |last1=Fermat |first1=Pierre de |editor1-last=Tannery |editor1-first=Paul |editor2-last=Henry |editor2-first=Charles |title=Oeuvres de Fermat |date=1894 |publisher=Gauthier-Villars et fils |location=Paris, France |pages=333–335 |volume=2nd vol. |url=https://www.biodiversitylibrary.org/item/62833#page/351/mode/1up |language=fr, la}} 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: * {{cite book |last1=Fermat |first1=Pierre de |editor1-last=Tannery |editor1-first=Paul |editor2-last=Henry |editor2-first=Charles |title=Oeuvres de Fermat |date=1896 |publisher=Gauthier-Villars et fils |location=Paris, France |pages=312–313 |volume=3rd vol. |url=https://www.biodiversitylibrary.org/item/62740#page/334/mode/1up |language=fr, la}} Both letters are translated (in part) into English in: * {{cite book |editor1-last=Struik |editor1-first=Dirk Jan |title=A Source Book in Mathematics, 1200–1800 |date=1986 |publisher=Princeton University Press |location=Princeton, New Jersey, USA |pages=29–30 |isbn=9781400858002 |url=https://books.google.com/books?id=o-3_AwAAQBAJ&pg=PA29}}</ref> 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, 2nd Viscount Brouncker|William Brouncker]] gave solutions to these problems, though Wallis suggests in a letter that the solution was due to Brouncker.<ref>In January 1658, at the end of {{lang|la|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. [https://books.google.com/books?id=_6nstlHZzaEC&pg=PA807 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 that Britain finally [[Calendar (New Style) Act 1750|discarded in 1752]]: most of the rest of Europe would have regarded that date as January 31, 1658. See [[Old Style and New Style dates#Transposition of historical event dates and possible date conflicts]].</ref> [[John Pell (mathematician)|John Pell]]'s connection with the equation is that he revised [[Thomas Branker]]'s translation<ref>{{citation |last=Rahn |first=Johann Heinrich |title=An introduction to algebra |url=http://eebo.chadwyck.com/search/full_rec?SOURCE=pgimages.cfg&ACTION=ByID&ID=V57365 |year=1668 |editor-last=Brancker |editor-first=Thomas |orig-year=1659 |editor2-last=Pell}}.</ref> of [[Johann Rahn]]'s 1659 book ''Teutsche Algebra''<ref group=note>''[[wikt:Special:Search/Teutsch|Teutsch]]'' is an obsolete form of ''Deutsch'', meaning "German". Free E-book: [https://books.google.com/books?id=ZJg_AAAAcAAJ ''Teutsche Algebra''] at Google Books.</ref> 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.<ref name=":1">{{Cite book |last=Tattersall |first=James |url=https://pdfs.semanticscholar.org/6881/a5169f76c5b4de2b206346815313f343af52.pdf |archive-url=https://web.archive.org/web/20200215183051/https://pdfs.semanticscholar.org/6881/a5169f76c5b4de2b206346815313f343af52.pdf |url-status=dead |archive-date=2020-02-15 |title=Elementary Number Theory in Nine Chapters |publisher=Cambridge |year=2000 |pages=274 |doi=10.1017/CBO9780511756344 |isbn=9780521850148 |s2cid=118948378}}</ref> The general theory of Pell's equation, based on [[continued fraction]]s and algebraic manipulations with numbers of the form <math>P + Q\sqrt{a},</math> was developed by Lagrange in 1766–1769.<ref>"Solution d'un Problème d'Arithmétique", in [[Joseph Alfred Serret]] (ed.), [http://gdz.sub.uni-goettingen.de/dms/load/toc/?PID=PPN308899644 ''Œuvres de Lagrange'', vol. 1], pp. 671–731, 1867.</ref> In particular, Lagrange gave a proof that the Brouncker–Wallis algorithm always terminates. ==Solutions== ===Fundamental solution via continued fractions=== Let <math>h_i/k_i</math> denote the unique sequence of [[Convergent (continued fraction)|convergents]] of the [[continued fraction|regular continued fraction]] for <math>\sqrt{n}</math>. Then the pair of positive integers <math>(x_1, y_1)</math> solving Pell's equation and minimizing ''x'' satisfies ''x''<sub>1</sub> = ''h<sub>i</sub>'' and ''y''<sub>1</sub> = ''k<sub>i</sub>'' for some ''i''. This pair is called the ''fundamental solution''. The sequence of integers <math>[a_0; a_1,a_2,\ldots]</math> in the regular continued fraction of <math>\sqrt{n}</math> is always eventually periodic. It can be written in the form <math>\left[\lfloor\sqrt{n}\rfloor;\;\overline{a_1,a_2,\ldots,a_{r-1}, 2\lfloor\sqrt{n}\rfloor}\right]</math>, where <math>\lfloor\, \cdot\, \rfloor</math> denotes integer floor, and the sequence <math>a_1,a_2,\ldots,a_{r-1}, 2\lfloor\sqrt{n}\rfloor</math> repeats infinitely. Moreover, the tuple <math>(a_1,a_2,\ldots,a_{r-1})</math> is [[palindrome | palindromic]], the same left-to-right or right-to-left.<ref name="titu" /> The fundamental solution is <math display="block">(x_1, y_1)=\begin{cases} (h_{r-1}, k_{r-1}),&\text{ for }r\text{ even}\\ (h_{2r-1},k_{2r-1}),&\text{ for }r\text{ odd}\end{cases}</math> The computation 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 <math>(x_1, y_1)</math>. However, this is not a [[polynomial-time algorithm]] because the number of digits in the solution may be as large as {{radic|''n''}}, far larger than a polynomial in the number of digits in the input value ''n''.<ref name=":0">{{Citation |last=Lenstra |first=H. W. Jr. |title=Solving the Pell Equation |url=https://www.ams.org/notices/200202/fea-lenstra.pdf |journal=[[Notices of the American Mathematical Society]] |volume=49 |issue=2 |pages=182–192 |year=2002 |mr=1875156 |author-link=Hendrik Lenstra}}.</ref> ===Additional solutions from the fundamental solution=== Once the fundamental solution is found, all remaining solutions may be calculated algebraically from<ref name=":0" /> <math display="block">x_k + y_k \sqrt n = (x_1 + y_1 \sqrt n)^k,</math> expanding the right side, [[equating coefficients]] of <math>\sqrt{n}</math> on both sides, and equating the other terms on both sides. This yields the [[recurrence relation]]s <math display="block">x_{k+1} = x_1 x_k + n y_1 y_k,</math> <math display="block">y_{k+1} = x_1 y_k + y_1 x_k.</math> ===Concise representation and faster algorithms=== Although writing out the fundamental solution (''x''<sub>1</sub>, ''y''<sub>1</sub>) 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 <math display="block">x_1+y_1\sqrt n = \prod_{i=1}^t \left(a_i + b_i\sqrt n\right)^{c_i}</math> using much smaller integers ''a''<sub>''i''</sub>, ''b''<sub>''i''</sub>, and ''c''<sub>''i''</sub>. For instance, [[Archimedes' cattle problem]] is equivalent to the Pell equation <math>x^2 - 410\,286\,423\,278\,424\ y^2 = 1</math>, the fundamental solution of which has {{val|206545}} digits if written out explicitly. However, the solution is also equal to <math display="block">x_1 + y_1 \sqrt n = u^{2329},</math> where <math display="block">u = x'_1 + y'_1 \sqrt{4\,729\,494} = (300\,426\,607\,914\,281\,713\,365\ \sqrt{609} + 84\,129\,507\,677\,858\,393\,258\ \sqrt{7766})^2</math> and <math>x'_1</math> and <math>y'_1</math> only have 45 and 41 decimal digits respectively.<ref name=":0" /> 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 {{radic|''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 <math display="block">\exp O\left(\sqrt{\log N\cdot\log\log N}\right),</math> where ''N'' = log ''n'' is the input size, similarly to the quadratic sieve.<ref name=":0" /> ===Quantum algorithms=== Hallgren showed that a [[quantum computer]] can find a product representation, as described above, for the solution to Pell's equation in polynomial time.<ref>{{Citation |last=Hallgren |first=Sean |title=Polynomial-time quantum algorithms for Pell's equation and the principal ideal problem |journal=Journal of the ACM |volume=54 |issue=1 |pages=1–19 |year=2007 |doi=10.1145/1206035.1206039 |s2cid=948064}}.</ref> 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 and Völlmer.<ref>{{Citation |last1=Schmidt |first1=A. |title=Proceedings of the thirty-seventh annual ACM symposium on Theory of computing – STOC '05 |pages=475–480 |year=2005 |chapter=Polynomial time quantum algorithm for the computation of the unit group of a number field |chapter-url=http://www.cdc.informatik.tu-darmstadt.de/reports/reports/Schmidt_Vollmer_STOC05.pdf |location=New York |publisher=ACM, Symposium on Theory of Computing |citeseerx=10.1.1.420.6344 |doi=10.1145/1060590.1060661 |isbn=1581139608 |last2=Völlmer |first2=U. |s2cid=6654142 |access-date=25 October 2017 |archive-date=26 October 2017 |archive-url=https://web.archive.org/web/20171026110757/https://www.cdc.informatik.tu-darmstadt.de/reports/reports/Schmidt_Vollmer_STOC05.pdf |url-status=dead }}.</ref> ==Example== As an example, consider the instance of Pell's equation for ''n'' = 7; that is, <math display="block">x^2 - 7y^2 = 1.</math> The continued fraction of <math>\sqrt{7}</math> has the form <math>[2;\ \overline{1, 1, 1, 4}]</math>. Since the period has length <math>4</math>, which is an even number, the convergent producing the fundamental solution is obtained by truncating the continued fraction right before the end of the first occurrence of the period: <math>[2;\ 1,1,1]=\frac{8}{3}</math>. The sequence of convergents for the square root of seven are <div style="font-size:90%"> :{| class="wikitable" style="text-align:center;" |- ! <math>h/k</math><br><small>(convergent)</small> ! <math>h^2 - 7 k^2</math><br><small>(Pell-type approximation)</small> |- | <math>2 / 1</math> | <math>-3</math> |- | <math>3 / 1</math> | <math>+2</math> |- | <math>5 / 2</math> | <math>-3</math> |- | <math>8 / 3</math> | <math>+1</math> |} </div> 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 {{OEIS link|id=A001081}} (''x'') and {{OEIS link|id=A001080}} (''y'') in [[OEIS]]) For the Pell's equation <math display="block">x^2 - 13y^2 = 1,</math> the continued fraction <math>\sqrt{13}=[3;\ \overline{1,1,1,1,6}]</math> has a period of odd length. For this the fundamental solution is obtained by truncating the continued fraction right before the second occurrence of the period <math>[3;\ 1,1,1,1,6,1,1,1,1]=\frac{649}{180}</math>. Thus, the fundamental solution is <math>(x_1, y_1)=(649, 180)</math>. The smallest solution can be very large. For example, the smallest solution to <math>x^2 - 313y^2 = 1</math> is ({{val|32188120829134849}}, {{val|1819380158564160}}), and this is the equation which Frenicle challenged Wallis to solve.<ref>{{cite web |url = http://primes.utm.edu/curios/page.php?short=313 |title = Prime Curios!: 313}}</ref> Values of ''n'' such that the smallest solution of <math>x^2 - ny^2 = 1</math> 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, ... {{OEIS|id=A033316}}. (For these records, see {{oeis|id=A033315}} for ''x'' and {{oeis|id=A033319}} for ''y''.) ==List of fundamental solutions of Pell's equations== The following is a list of the fundamental solution to <math>x^2 - n y^2 = 1</math> with ''n'' ≤ 128. When ''n'' is an integer square, there is no solution except for the trivial solution (1, 0). The values of ''x'' are sequence {{OEIS link|id=A002350}} and those of ''y'' are sequence {{OEIS link|id=A002349}} in [[OEIS]]. {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 1 | – || – |- ! 2 | 3 || 2 |- ! 3 | 2 || 1 |- ! 4 | – || – |- ! 5 | 9 || 4 |- ! 6 | 5 || 2 |- ! 7 | 8 || 3 |- ! 8 | 3 || 1 |- ! 9 | – || – |- ! 10 | 19 || 6 |- ! 11 | 10 || 3 |- ! 12 | 7 || 2 |- ! 13 | 649 || 180 |- ! 14 | 15 || 4 |- ! 15 | 4 || 1 |- ! 16 | – || – |- ! 17 | 33 || 8 |- ! 18 | 17 || 4 |- ! 19 | 170 || 39 |- ! 20 | 9 || 2 |- ! 21 | 55 || 12 |- ! 22 | 197 || 42 |- ! 23 | 24 || 5 |- ! 24 | 5 || 1 |- ! 25 | – || – |- ! 26 | 51 || 10 |- ! 27 | 26 || 5 |- ! 28 | 127 || 24 |- ! 29 | 9801 || 1820 |- ! 30 | 11 || 2 |- ! 31 | 1520 || 273 |- ! 32 | 17 || 3 |} {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 33 | 23 || 4 |- ! 34 | 35 || 6 |- ! 35 | 6 || 1 |- ! 36 | – || – |- ! 37 | 73 || 12 |- ! 38 | 37 || 6 |- ! 39 | 25 || 4 |- ! 40 | 19 || 3 |- ! 41 | 2049 || 320 |- ! 42 | 13 || 2 |- ! 43 | 3482 || 531 |- ! 44 | 199 || 30 |- ! 45 | 161 || 24 |- ! 46 | 24335 || 3588 |- ! 47 | 48 || 7 |- ! 48 | 7 || 1 |- ! 49 | – || – |- ! 50 | 99 || 14 |- ! 51 | 50 || 7 |- ! 52 | 649 || 90 |- ! 53 | 66249 || 9100 |- ! 54 | 485 || 66 |- ! 55 | 89 || 12 |- ! 56 | 15 || 2 |- ! 57 | 151 || 20 |- ! 58 | 19603 || 2574 |- ! 59 | 530 || 69 |- ! 60 | 31 || 4 |- ! 61 | 1766319049 || 226153980 |- ! 62 | 63 || 8 |- ! 63 | 8 || 1 |- ! 64 | – || – |} {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 65 | 129 || 16 |- ! 66 | 65 || 8 |- ! 67 | 48842 || 5967 |- ! 68 | 33 || 4 |- ! 69 | 7775 || 936 |- ! 70 | 251 || 30 |- ! 71 | 3480 || 413 |- ! 72 | 17 || 2 |- ! 73 | 2281249 || 267000 |- ! 74 | 3699 || 430 |- ! 75 | 26 || 3 |- ! 76 | 57799 || 6630 |- ! 77 | 351 || 40 |- ! 78 | 53 || 6 |- ! 79 | 80 || 9 |- ! 80 | 9 || 1 |- ! 81 | – || – |- ! 82 | 163 || 18 |- ! 83 | 82 || 9 |- ! 84 | 55 || 6 |- ! 85 | 285769 || 30996 |- ! 86 | 10405 || 1122 |- ! 87 | 28 || 3 |- ! 88 | 197 || 21 |- ! 89 | 500001 || 53000 |- ! 90 | 19 || 2 |- ! 91 | 1574 || 165 |- ! 92 | 1151 || 120 |- ! 93 | 12151 || 1260 |- ! 94 | 2143295 || 221064 |- ! 95 | 39 || 4 |- ! 96 | 49 || 5 |} {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 97 | 62809633 || 6377352 |- ! 98 | 99 || 10 |- ! 99 | 10 || 1 |- ! 100 | – || – |- ! 101 | 201 || 20 |- ! 102 | 101 || 10 |- ! 103 | 227528 || 22419 |- ! 104 | 51 || 5 |- ! 105 | 41 || 4 |- ! 106 | 32080051 || 3115890 |- ! 107 | 962 || 93 |- ! 108 | 1351 || 130 |- ! 109 | 158070671986249 || 15140424455100 |- ! 110 | 21 || 2 |- ! 111 | 295 || 28 |- ! 112 | 127 || 12 |- ! 113 | 1204353 || 113296 |- ! 114 | 1025 || 96 |- ! 115 | 1126 || 105 |- ! 116 | 9801 || 910 |- ! 117 | 649 || 60 |- ! 118 | 306917 || 28254 |- ! 119 | 120 || 11 |- ! 120 | 11 || 1 |- ! 121 | – || – |- ! 122 | 243 || 22 |- ! 123 | 122 || 11 |- ! 124 | 4620799 || 414960 |- ! 125 | 930249 || 83204 |- ! 126 | 449 || 40 |- ! 127 | 4730624 || 419775 |- ! 128 | 577 || 51 |} ==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 number]]s, as the formula <math display="block">x^2 - n y^2 = (x + y\sqrt n)(x - y\sqrt n)</math> is the [[Field norm|norm]] for the [[Ring (mathematics)|ring]] <math>\mathbb{Z}[\sqrt{n}]</math> and for the closely related [[quadratic field]] <math>\mathbb{Q}(\sqrt{n})</math>. Thus, a pair of integers <math>(x, y)</math> solves Pell's equation if and only if <math>x + y \sqrt{n}</math> is a [[Unit (ring theory)|unit]] with norm 1 in <math>\mathbb{Z}[\sqrt{n}]</math>.<ref>{{Cite journal |last=Clark |first=Pete |title=Number Theory: A Contemporary Introduction |url=http://alpha.math.uga.edu/~pete/4400FULL2018.pdf|journal=University of Georgia}} Ch. 7 The Pell Equation</ref> [[Dirichlet's unit theorem]], that all units of <math>\mathbb{Z}[\sqrt{n}]</math> can be expressed as powers of a single [[Fundamental unit (number theory)|fundamental unit]] (and multiplication by a sign), is an algebraic restatement of the fact that all solutions to the Pell's equation can be generated from the fundamental solution.<ref>{{Cite web |last=Conrad |first=Keith |title=Dirichlet's Unit Theorem |url=https://kconrad.math.uconn.edu/blurbs/gradnumthy/unittheorem.pdf |access-date=14 July 2020}}</ref> 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 mentions a connection between Pell's equation and the [[Chebyshev polynomials]]: If <math>T_i(x)</math> and <math>U_i(x)</math> 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]] <math>R[x]</math>, with <math>n = x^2 - 1</math>:<ref>{{Citation |last=Demeyer |first=Jeroen |title=Diophantine Sets over Polynomial Rings and Hilbert's Tenth Problem for Function Fields |url=http://cage.ugent.be/~jdemeyer/phd.pdf |page=70 |year=2007 |archive-url=https://web.archive.org/web/20070702185523/https://cage.ugent.be/~jdemeyer/phd.pdf |series=PhD thesis, [[Ghent University]] |access-date=27 February 2009 |archive-date=2 July 2007 |url-status=dead}}.</ref> <math display="block">T_i^2 - (x^2-1) U_{i-1}^2 = 1.</math> Thus, these polynomials can be generated by the standard technique for Pell's equations of taking powers of a fundamental solution: <math display="block">T_i + U_{i-1} \sqrt{x^2-1} = (x + \sqrt{x^2-1})^i.</math> It may further be observed that if <math>(x_i, y_i)</math> are the solutions to any integer Pell's equation, then <math>x_i = T_i (x_1)</math> and <math>y_i = y_1 U_{i-1} (x_1)</math>.<ref>{{Citation |last=Barbeau |first=Edward J. |title=Pell's Equation |url=https://archive.org/details/pellsequation0000barb |chapter=3. Quadratic surds |year=2003 |series=Problem Books in Mathematics |publisher=Springer-Verlag |isbn=0-387-95529-1 |mr=1949691 |url-access=registration}}.</ref> ===Continued fractions=== A general development of solutions of Pell's equation <math>x^2 - n y^2 = 1</math> in terms of [[continued fraction]]s of <math>\sqrt{n}</math> 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 irrational]]s.<ref name="titu" /> 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 <math display="block">\begin{pmatrix} p & q \\ nq & p \end{pmatrix}</math> 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 ''p''<sub>''k''−1</sub>/''q''<sub>''k''−1</sub> and ''p''<sub>''k''</sub>/''q''<sub>''k''</sub> are two successive convergents of a continued fraction, then the matrix <math display="block">\begin{pmatrix} p_{k-1} & p_{k} \\ q_{k-1} & q_{k} \end{pmatrix}</math> has determinant (−1)<sup>''k''</sup>. ===Smooth numbers=== [[Størmer's theorem]] applies Pell equations to find pairs of consecutive [[smooth number]]s, positive integers whose prime factors are all smaller than a given value.<ref name="stormer">{{cite journal |last=Størmer |first=Carl |author-link=Carl Størmer |title=Quelques théorèmes sur l'équation de Pell <math>x^2 - Dy^2 = \pm1</math> et leurs applications |language=fr |journal=Skrifter Videnskabs-selskabet (Christiania), Mat.-Naturv. Kl. |volume=I |issue=2 |year=1897}}</ref><ref>{{cite journal |last=Lehmer |first=D. H. |author-link=D. H. Lehmer |year=1964 |title=On a Problem of Størmer |journal=Illinois Journal of Mathematics |volume=8 |issue=1 |pages=57–79 |mr=0158849 |doi=10.1215/ijm/1256067456 |doi-access=free}}</ref> As part of this theory, [[Carl Størmer|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''.<ref name=stormer/> ==The negative Pell's equation== The negative Pell's equation is given by <math display="block">x^2 - n y^2 = -1</math> and has also been extensively studied. It can be solved by the same method of continued fractions and has solutions if and only if the period of the continued fraction has odd length. A necessary (but not sufficient) condition for solvability is that ''n'' is not divisible by 4 or by a prime of form 4''k'' + 3.<ref group=note>This is because the Pell equation implies that −1 is a [[quadratic residue]] modulo ''n''.</ref> Thus, for example, ''x''<sup>2</sup> − 3 ''y''<sup>2</sup> = −1 is never solvable, but ''x''<sup>2</sup> − 5 ''y''<sup>2</sup> = −1 may be.<ref>{{Cite journal |last1=Wang |first1=Jiaqi |last2=Cai |first2=Lide |date=December 2013 |title=The solvability of negative Pell equation |url=http://archive.ymsc.tsinghua.edu.cn/pacm_download/21/241-2013The_solvability_of_negative_Pell_equation.pdf |journal=Tsinghua College |pages=5–6}}</ref> The first few numbers ''n'' for which ''x''<sup>2</sup> − ''n y''<sup>2</sup> = −1 is solvable are 1 (with only one trivial solution) and :2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, ... {{OEIS|id=A031396}} with infinitely many solutions. The solutions of the negative Pell's equation for <math>1 \le n \le 298</math> are: {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 1 | 0 || 1 |- ! 2 | 1 || 1 |- ! 5 | 2 || 1 |- ! 10 | 3 || 1 |- ! 13 | 18 || 5 |- ! 17 | 4 || 1 |- ! 26 | 5 || 1 |- ! 29 | 70 || 13 |- ! 37 | 6 || 1 |- ! 41 | 32 || 5 |- ! 50 | 7 || 1 |- ! 53 | 182 || 25 |- ! 58 | 99 || 13 |- ! 61 | 29718 || 3805 |- ! 65 | 8 || 1 |- ! 73 | 1068 || 125 |- ! 74 | 43 || 5 |- ! 82 | 9 || 1 |} {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 85 | 378 || 41 |- ! 89 | 500 || 53 |- ! 97 | 5604 || 569 |- ! 101 | 10 || 1 |- ! 106 | 4005 || 389 |- ! 109 | 8890182 || 851525 |- ! 113 | 776 || 73 |- ! 122 | 11 || 1 |- ! 125 | 682 || 61 |- ! 130 | 57 || 5 |- ! 137 | 1744 || 149 |- ! 145 | 12 || 1 |- ! 149 | 113582 || 9305 |- ! 157 | 4832118 || 385645 |- ! 170 | 13 || 1 |- ! 173 | 1118 || 85 |- ! 181 | 1111225770 || 82596761 |- ! 185 | 68 || 5 |} {| class="wikitable" style="text-align: right; display: inline-table;" ! ''n'' || ''x'' || ''y'' |- ! 193 | 1764132 || 126985 |- ! 197 | 14 || 1 |- ! 202 | 3141 || 221 |- ! 218 | 251 || 17 |- ! 226 | 15 || 1 |- ! 229 | 1710 || 113 |- ! 233 | 23156 || 1517 |- ! 241 | 71011068 || 4574225 |- ! 250 | 4443 || 281 |- ! 257 | 16 || 1 |- ! 265 | 6072 || 373 |- ! 269 | 82 || 5 |- ! 274 | 1407 || 85 |- ! 277 | 8920484118 || 535979945 |- ! 281 | 1063532 || 63445 |- ! 290 | 17 || 1 |- ! 293 | 2482 || 145 |- ! 298 | 409557 || 23725 |} Let <math>\alpha = \Pi_{j\text{ is odd}} (1 - 2^j)</math>. The proportion of square-free ''n'' divisible by ''k'' primes of the form 4''m'' + 1 for which the negative Pell's equation is solvable is at least ''α''.<ref>{{Citation |last1=Cremona |first1=John E. |title=Some density results for negative Pell equations; an application of graph theory |journal=Journal of the London Mathematical Society |volume=39 |issue=1 |pages=16–28 |year=1989 |series=Second Series |doi=10.1112/jlms/s2-39.1.16 |issn=0024-6107 |last2=Odoni |first2=R. W. K.}}.</ref> When the number of prime divisors is not fixed, the proportion is given by 1 − ''α.''<ref>{{Cite web |date=2022-08-10 |title=Ancient Equations Offer New Look at Number Groups |url=https://www.quantamagazine.org/ancient-equations-offer-new-look-at-number-groups-20220810/ |access-date=2022-08-18 |website=Quanta Magazine |language=en}}</ref><ref>{{cite arXiv |last1=Koymans |first1=Peter |last2=Pagano |first2=Carlo |date=2022-01-31 |title=On Stevenhagen's conjecture |class=math.NT |eprint=2201.13424 }}</ref> If the negative Pell's 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: <math display="block">(x^2 - n y^2)^2 = (-1)^2</math> implies <math display="block">>(x^2 + n y^2)^2 - n(2xy)^2 = 1.</math> As stated above, if the negative Pell's equation is solvable, a solution can be found using the method of continued fractions as in the positive Pell's equation. The recursion relation works slightly differently however. Since <math>(x + y\sqrt{n})(x - y\sqrt{n}) = -1</math>, the next solution is determined in terms of <math>i(x_k + y_k\sqrt{n}) = (i(x + y\sqrt{n}))^k</math> whenever there is a match, that is, when <math>k</math> is odd. The resulting recursion relation is (modulo a minus sign, which is immaterial due to the quadratic nature of the equation) <math display="block">x_k = x_{k-2} x_1^2 + n x_{k-2} y_1^2 + 2 n y_{k-2} y_1 x_1,</math> <math display="block">y_k = y_{k-2} x_1^2 + n y_{k-2} y_1^2 + 2 x_{k-2} y_1 x_1,</math> which gives an infinite tower of solutions to the negative Pell's equation (except for <math>n = 1</math>). == Generalized Pell's equation == The equation <math display="block">x^2 - n y^2 = N</math> is called the '''generalized'''<ref name="Peker_2021">{{cite book |last=Peker |first=Bilge |date=2021 |title=Current Studies in Basic Sciences, Engineering and Technology 2021 |url=https://www.isres.org/books/chapters/CSBET2021_10_03-01-2022.pdf |publisher= ISRES Publishing |page=136 |access-date=2024-02-25}}</ref><ref name="Tamang_2022">{{cite report |last=Tamang |first=Bal Bahadur |date=August 2022 |title=Solvability of Generalized Pell's Equation and Its Applications in Real Life |url=https://www.researchgate.net/publication/363254319 |publisher=Tribhuvan University |access-date=2024-02-25}}</ref> (or '''general'''<ref name="titu">{{Cite book |last1=Andreescu |first1=Titu |title=Quadratic Diophantine Equations |last2=Andrica |first2=Dorin |publisher=Springer |year=2015 |isbn=978-0-387-35156-8 |location=[[New York City|New York]]}}</ref>) '''Pell's equation'''. The equation <math>u^2 - n v^2 = 1</math> is the corresponding '''Pell's resolvent'''.<ref name="titu"/> A recursive algorithm was given by Lagrange in 1768 for solving the equation, reducing the problem to the case <math>|N| < \sqrt{n}</math>.<ref>{{Cite book |last=Lagrange |first=Joseph-Louis |url=https://gallica.bnf.fr/ark:/12148/bpt6k215570z |title=Oeuvres de Lagrange. T. 2 / publiées par les soins de M. J.-A. Serret [et G. Darboux]; [précédé d'une notice sur la vie et les ouvrages de J.-L. Lagrange, par M. Delambre] |date=1867–1892 |language=fr}}</ref><ref>{{Cite web |last=Matthews |first=Keith |title=The Diophantine Equation ''x''<sup>2</sup> − ''Dy''<sup>2</sup> = ''N'', ''D'' > 0 |url=http://www.numbertheory.org/pdfs/patz5.pdf |archive-url=https://web.archive.org/web/20150318090657/http://www.numbertheory.org/pdfs/patz5.pdf |archive-date=2015-03-18 |url-status=live |access-date=20 July 2020}}</ref> Such solutions can be derived using the continued-fractions method as outlined above. If <math>(x_0, y_0)</math> is a solution to <math> x^2 - n y^2 = N,</math> and <math>(u_k, v_k)</math> is a solution to <math>u^2 - n v^2 = 1,</math> then <math>(x_k, y_k)</math> such that <math>x_k + y_k \sqrt{n} = \big(x_0 + y_0 \sqrt{n}\big)\big(u_k + v_k \sqrt{n}\big)</math> is a solution to <math>x^2 - n y^2 = N</math>, a principle named the ''multiplicative principle''.<ref name="titu"/> The solution <math>(x_k, y_k)</math> is called a ''Pell multiple'' of the solution <math>(x_0, y_0)</math>. There exists a finite set of solutions to <math>x^2 - n y^2 = N</math> such that every solution is a Pell multiple of a solution from that set. In particular, if <math>(u, v)</math> is the fundamental solution to <math>u^2 - n v^2 = 1</math>, then each solution to the equation is a Pell multiple of a solution <math>(x, y)</math> with <math>|x| \le \tfrac{1}{2} \sqrt{|N|} \left(\sqrt{|U|} + 1\right)</math> and <math>|y| \le \tfrac{1}{2 \sqrt{n}} \sqrt{|N|} \left(\sqrt{|U|} + 1\right) </math>, where <math>U = u + v \sqrt n</math>.<ref name="kconrad">{{cite web |last1=Conrad |first1=Keith |title=PELL'S EQUATION, II |url=https://kconrad.math.uconn.edu/blurbs/ugradnumthy/pelleqn2.pdf |access-date=14 October 2021}}</ref> If ''x'' and ''y'' are positive integer solutions to the Pell's equation with <math>|N| < \sqrt n</math>, then <math>x/y</math> is a convergent to the continued fraction of <math>\sqrt n</math>.<ref name="kconrad" /> Solutions to the generalized Pell's equation are used for solving certain [[Diophantine equation]]s and [[unit (ring theory)|units]] of certain [[ring (mathematics)|ring]]s,<ref>{{Cite journal |last=Bernstein |first=Leon |date=1975-10-01 |title=Truncated units in infinitely many algebraic number fields of degreen ≧4 |journal=Mathematische Annalen |language=en |volume=213 |issue=3 |pages=275–279 |doi=10.1007/BF01350876 |s2cid=121165073 |issn=1432-1807}}</ref><ref>{{Cite journal |last=Bernstein |first=Leon |date=1 March 1974 |title=On the Diophantine Equation ''x''(''x'' + ''n'')(''x'' + 2''n'') + ''y''(''y'' + ''n'')(''y'' + 2''n'') = ''z''(''z'' + ''n'')(''z'' + 2''n'') |journal=Canadian Mathematical Bulletin |language=en |volume=17 |issue=1 |pages=27–34 |doi=10.4153/CMB-1974-005-5 |s2cid=125002637 |issn=0008-4395|doi-access=free }}</ref> and they arise in the study of [[SIC-POVM]]s in [[quantum information theory]].<ref>{{Cite journal |last1=Appleby |first1=Marcus |last2=Flammia |first2=Steven |last3=McConnell |first3=Gary |last4=Yard |first4=Jon |date=August 2017 |title=SICs and Algebraic Number Theory |journal=[[Foundations of Physics]] |language=en |volume=47 |issue=8 |pages=1042–1059 |arxiv=1701.05200 |bibcode=2017FoPh...47.1042A |doi=10.1007/s10701-017-0090-7 |s2cid=119334103 |issn=0015-9018}}</ref> The equation <math display="block">x^2 - n y^2 = 4</math> is similar to the resolvent <math>x^2 - n y^2 = 1</math> in that if a minimal solution to <math>x^2 - n y^2 = 4</math> can be found, then all solutions of the equation can be generated in a similar manner to the case <math>N = 1</math>. For certain <math>n</math>, solutions to <math>x^2 - n y^2 = 1</math> can be generated from those with <math>x^2 - n y^2 = 4</math>, in that if <math>n \equiv 5 \pmod{8},</math> then every third solution to <math>x^2 - n y^2 = 4</math> has <math>x, y</math> even, generating a solution to <math>x^2 - n y^2 = 1</math>.<ref name="titu" /> == Notes == {{reflist|group=note}} ==References== <references/> ==Further reading== *{{Cite book |last=Edwards |first=Harold M. |title=Fermat's Last Theorem: A Genetic Introduction to Algebraic Number Theory |publisher=[[Springer-Verlag]] |year=1996 |isbn=0-387-90230-9 |series=[[Graduate Texts in Mathematics]] |volume=50 |mr=0616635 |ref=none |author-link=Harold Edwards (mathematician) |orig-year=1977}} *{{Cite journal |last=Pinch |first=R. G. E. |year=1988 |title=Simultaneous Pellian equations |url=http://www.s369624816.websitehome.co.uk/rgep/p08.ps |volume=103 |issue=1 |pages=35–46 |bibcode=1988MPCPS.103...35P |doi=10.1017/S0305004100064598 |ref=none |journal=[[Mathematical Proceedings of the Cambridge Philosophical Society]] |s2cid=123098216 }} *{{Cite book |last=Whitford |first=Edward Everett |year=1912 |title=The Pell equation |url=http://name.umdl.umich.edu/ABV2773.0001.001 |publisher=Columbia University |format=PhD Thesis |ref=none}} * {{Cite book |last=Williams |first=H. C. |year=2002 |editor-last=Bennett |editor-first=M. A. |title=Surveys in number theory: Papers from the millennial conference on number theory |chapter=Solving the Pell equation |location=Natick, MA |publisher=[[A K Peters]] |pages=325–363 |isbn=1-56881-162-4 |zbl=1043.11027 |ref=none |editor-last2=Berndt |editor-first2=B. C. |editor-link2=Bruce C. Berndt |editor-last3=Boston |editor-first3=N. |editor-link3=Nigel Boston |editor-last4=Diamond |editor-first4=H. G. |editor-last5=Hildebrand |editor-first5=A. J. |editor-last6=Philipp |editor-first6=W.}} * {{cite book | last=Andreescu | first=Titu | last2=Andrica | first2=Dorin | title=Quadratic Diophantine Equations | publisher=Springer | publication-place=New York | date=2015 | isbn=978-0-387-35156-8 | oclc=916486370}} * {{cite book | last=Jacobson | first=Michael | last2=Williams | first2=Hugh | title=Solving the Pell Equation | publisher=Springer-Verlag | publication-place=New York, NY | date=2008 | isbn=978-0-387-84922-5 | oclc=245561348 }} ==External links== * {{mathworld|urlname=PellEquation|title=Pell's equation|ref=none}} * {{MacTutor|class=HistTopics|id=Pell|title=Pell's equation}} * [http://www.jakebakermaths.org.uk/maths/jshtmlpellsolverbigintegerv10.html Pell equation solver] (''n'' has no upper limit) * [http://www.numbertheory.org/php/pell.html Pell equation solver] (''n'' < 10<sup>10</sup>, can also return the solution to ''x''<sup>2</sup> − ''ny''<sup>2</sup> = ±1, ±2, ±3, and ±4) {{Authority control}} {{DEFAULTSORT:Pell's Equation}} [[Category:Diophantine equations]] [[Category:Continued fractions]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Authority control
(
edit
)
Template:Citation
(
edit
)
Template:Cite arXiv
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite report
(
edit
)
Template:Cite web
(
edit
)
Template:Good article
(
edit
)
Template:Lang
(
edit
)
Template:MacTutor
(
edit
)
Template:MacTutor Biography
(
edit
)
Template:Math
(
edit
)
Template:Mathworld
(
edit
)
Template:OEIS
(
edit
)
Template:OEIS link
(
edit
)
Template:Oeis
(
edit
)
Template:Radic
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Val
(
edit
)
Search
Search
Editing
Pell's equation
Add topic