HOME

TheInfoList



OR:

Pell's equation, also called the Pell–Fermat equation, is any
Diophantine equation ''Diophantine'' means pertaining to the ancient Greek mathematician Diophantus. A number of concepts bear this name: *Diophantine approximation In number theory, the study of Diophantine approximation deals with the approximation of real n ...
of the form x^2 - ny^2 = 1, where ''n'' is a given positive nonsquare
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
, and integer solutions are sought for ''x'' and ''y''. In
Cartesian coordinates In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
, the equation is represented by a
hyperbola In mathematics, a hyperbola is a type of smooth function, smooth plane curve, curve lying in a plane, defined by its geometric properties or by equations for which it is the solution set. A hyperbola has two pieces, called connected component ( ...
; solutions occur wherever the curve passes through a point whose ''x'' and ''y'' coordinates are both integers, such as the
trivial solution In mathematics, the adjective trivial is often used to refer to a claim or a case which can be readily obtained from context, or a particularly simple object possessing a given structure (e.g., group, topological space). The noun triviality usual ...
with ''x'' = 1 and ''y'' = 0.
Joseph Louis Lagrange Joseph-Louis Lagrange (born Giuseppe Luigi Lagrangiaperfect square, Pell's equation has infinitely many distinct integer solutions. These solutions may be used to accurately
approximate An approximation is anything that is intentionally similar but not exactly equal to something else. Etymology and usage The word ''approximation'' is derived from Latin ''approximatus'', from ''proximus'' meaning ''very near'' and the prefix ...
the
square root In mathematics, a square root of a number is a number such that y^2 = x; in other words, a number whose ''square'' (the result of multiplying the number by itself, or y \cdot y) is . For example, 4 and −4 are square roots of 16 because 4 ...
of ''n'' by
rational number In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example, The set of all ...
s of the form ''x''/''y''. This equation was first studied extensively in India starting with
Brahmagupta Brahmagupta ( – ) was an Indian Indian mathematics, mathematician and Indian astronomy, astronomer. He is the author of two early works on mathematics and astronomy: the ''Brāhmasphuṭasiddhānta'' (BSS, "correctly established Siddhanta, do ...
, who found an integer solution to 92x^2 + 1 = y^2 in his '' Brāhmasphuṭasiddhānta'' circa 628. 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, 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 Pythagoras of Samos (;  BC) was an ancient Ionian Greek philosopher, polymath, and the eponymous founder of Pythagoreanism. His political and religious teachings were well known in Magna Graecia and influenced the philosophies of P ...
in
Greece Greece, officially the Hellenic Republic, is a country in Southeast Europe. Located on the southern tip of the Balkan peninsula, it shares land borders with Albania to the northwest, North Macedonia and Bulgaria to the north, and Turkey to th ...
and a similar date in India. William Brouncker was the first European to solve Pell's equation. The name of Pell's equation arose from
Leonhard Euler Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
mistakenly attributing Brouncker's solution of the equation to John Pell.In Euler's (pp. 227ff), he presents a solution to Pell's equation which was taken from John Wallis' , specifically, Letter 17 () and Letter 19 () of: * The letters are in Latin. Letter 17 appears on pp. 56–72. Letter 19 appears on pp. 81–91. * French translations of Wallis' letters: 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' (1693), which includes articles by John Pell: * 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: :* (On Algebra by Dr. John Pell and especially on an incompletely determined problem), pp. 234–236. :* (Example of Pell's method), pp. 238–244. :* (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)
p. 52
*


History

As early as 400 BC in
India India, officially the Republic of India, is a country in South Asia. It is the List of countries and dependencies by area, seventh-largest country by area; the List of countries by population (United Nations), most populous country since ...
and
Greece Greece, officially the Hellenic Republic, is a country in Southeast Europe. Located on the southern tip of the Balkan peninsula, it shares land borders with Albania to the northwest, North Macedonia and Bulgaria to the north, and Turkey to th ...
, mathematicians studied the numbers arising from the ''n'' = 2 case of Pell's equation, x^2 - 2 y^2 = 1, and from the closely related equation x^2 - 2 y^2 = -1 because of the connection of these equations to the
square root of 2 The square root of 2 (approximately 1.4142) is the positive real number that, when multiplied by itself or squared, equals the number 2. It may be written as \sqrt or 2^. It is an algebraic number, and therefore not a transcendental number. Te ...
. Indeed, if ''x'' and ''y'' are
positive integers In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positiv ...
satisfying this equation, then ''x''/''y'' is an approximation of . The numbers ''x'' and ''y'' appearing in these approximations, called side and diameter numbers, were known to the
Pythagoreans Pythagoreanism originated in the 6th century BC, based on and around the teachings and beliefs held by Pythagoras and his followers, the Pythagoreans. Pythagoras established the first Pythagorean community in the Ancient Greece, ancient Greek co ...
, and
Proclus Proclus Lycius (; 8 February 412 – 17 April 485), called Proclus the Successor (, ''Próklos ho Diádokhos''), was a Greek Neoplatonist philosopher, one of the last major classical philosophers of late antiquity. He set forth one of th ...
observed that in the opposite direction these numbers obeyed one of these two equations. Similarly,
Baudhayana The (Sanskrit: बौधायन सूत्रस् ) are a group of Vedic Sanskrit texts which cover dharma, daily ritual, mathematics and is one of the oldest Dharma-related texts of Hinduism that have survived into the modern age from th ...
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 Archimedes of Syracuse ( ; ) was an Ancient Greece, Ancient Greek Greek mathematics, mathematician, physicist, engineer, astronomer, and Invention, inventor from the ancient city of Syracuse, Sicily, Syracuse in History of Greek and Hellenis ...
approximated the
square root of 3 The square root of 3 is the positive real number that, when multiplied by itself, gives the number 3. It is denoted mathematically as \sqrt or 3^. It is more precisely called the principal square root of 3 to distinguish it from the negative nu ...
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.. Likewise, Archimedes's cattle problem — an ancient word problem about finding the number of cattle belonging to the sun god
Helios In ancient Greek religion and Greek mythology, mythology, Helios (; ; Homeric Greek: ) is the god who personification, personifies the Sun. His name is also Latinized as Helius, and he is often given the epithets Hyperion ("the one above") an ...
— 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 Eratosthenes of Cyrene (; ;  – ) was an Ancient Greek polymath: a Greek mathematics, mathematician, geographer, poet, astronomer, and music theory, music theorist. He was a man of learning, becoming the chief librarian at the Library of A ...
, and the attribution to Archimedes is generally accepted today. Around AD 250,
Diophantus Diophantus of Alexandria () (; ) was a Greek mathematician who was the author of the '' Arithmetica'' in thirteen books, ten of which are still extant, made up of arithmetical problems that are solved through algebraic equations. Although Jose ...
considered the equation a^2 x^2 + c = y^2, 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 (; c. 953 – c. 1029) was a 10th-century Persian mathematician and engineer who flourished at Baghdad. He was born in Karaj, a city near Tehran. His three principal surviving works are mathematical: ''Al-Badi' fi'l-hisab'' (''Wonderful on ...
, a 10th-century Persian mathematician, worked on similar problems to Diophantus. In Indian mathematics,
Brahmagupta Brahmagupta ( – ) was an Indian Indian mathematics, mathematician and Indian astronomy, astronomer. He is the author of two early works on mathematics and astronomy: the ''Brāhmasphuṭasiddhānta'' (BSS, "correctly established Siddhanta, do ...
discovered that (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, a form of what is now known as
Brahmagupta's identity In algebra, Brahmagupta's identity says that, for given n, the product of two numbers of the form a^2+nb^2 is itself a number of that form. In other words, the set of such numbers is closed under multiplication. Specifically: :\begin \left(a^2 + ...
. Using this, he was able to "compose" triples (x_1, y_1, k_1) and (x_2, y_2, k_2) that were solutions of x^2 - Ny^2 = k, to generate the new triples : (x_1x_2 + Ny_1y_2 , x_1y_2 + x_2y_1 , k_1k_2) and (x_1x_2 - Ny_1y_2 , x_1y_2 - x_2y_1 , k_1k_2). Not only did this give a way to generate infinitely many solutions to x^2 - Ny^2 = 1 starting with one solution, but also, by dividing such a composition by k_1k_2, integer or "nearly integer" solutions could often be obtained. For instance, for N = 92, Brahmagupta composed the triple (10, 1, 8) (since 10^2 - 92(1^2) = 8) with itself to get the new triple (192, 20, 64). Dividing throughout by 64 ("8" for x and y) 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 x^2 - Ny^2 = k for ''k'' = ±1, ±2, or ±4.. 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 (cyclic) method, it starts by choosing two relatively prime integers a and b, then composing the triple (a, b, k) (that is, one which satisfies a^2 - Nb^2 = k) with the trivial triple (m, 1, m^2 - N) to get the triple \big(am + Nb, a + bm, k(m^2 - N)\big), which can be scaled down to \left(\frac, \frac, \frac\right). When m is chosen so that \frac is an integer, so are the other two numbers in the triple. Among such m, the method chooses one that minimizes \frac and repeats the process. This method always terminates with a solution. Bhaskara used it to give the solution ''x'' = , ''y'' =  to the ''N'' = 61 case. Several European mathematicians rediscovered how to solve Pell's equation in the 17th century.
Pierre de Fermat Pierre de Fermat (; ; 17 August 1601 – 12 January 1665) was a French mathematician who is given credit for early developments that led to infinitesimal calculus, including his technique of adequality. In particular, he is recognized for his d ...
found how to solve the equation and in a 1657 letter issued it as a challenge to English mathematicians. In a letter to
Kenelm Digby Sir Kenelm Digby (11 July 1603 – 11 June 1665) was an English courtier and diplomat. He was also a highly reputed natural philosopher, astrologer and known as a leading Roman Catholic intellectual and Thomas White (scholar), Blackloist. For ...
,
Bernard Frénicle de Bessy Bernard ('' Bernhard'') is a French and West Germanic masculine given name. It has West Germanic origin and is also a surname. The name is attested from at least the 9th century. West Germanic ''Bernhard'' is composed from the two elements ''ber ...
said that Fermat found the smallest solution for ''N'' up to 150 and challenged
John Wallis John Wallis (; ; ) was an English clergyman and mathematician, who is given partial credit for the development of infinitesimal calculus. Between 1643 and 1689 Wallis served as chief cryptographer for Parliament and, later, the royal court. ...
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. John Pell's connection with the equation is that he revised
Thomas Branker Thomas Branker (Brancker) (1633–1676) was an English mathematician. Life He was born at Barnstaple in August 1633, the son of another Thomas Brancker, a graduate of Exeter College, Oxford, who was in 1626 a schoolmaster near Ilchester, and a ...
's translation of
Johann Rahn Johann Rahn (Latinised form Rhonius) (10 March 1622 – 25 May 1676) was a Swiss mathematician who is credited with the first use of the division sign, ÷ (a repurposed obelus An obelus (plural: obeluses or obeli) is a term in codicology ...
's 1659 book ''Teutsche Algebra'''' Teutsch'' is an obsolete form of ''Deutsch'', meaning "German". Free E-book
''Teutsche Algebra''
at Google Books.
into English, with a discussion of Brouncker's solution of the equation.
Leonhard Euler Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
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 fraction A continued fraction is a mathematical expression that can be written as a fraction with a denominator that is a sum that contains another simple or continued fraction. Depending on whether this iteration terminates with a simple fraction or not, ...
s and algebraic manipulations with numbers of the form P + Q\sqrt, was developed by Lagrange in 1766–1769. In particular, Lagrange gave a proof that the Brouncker–Wallis algorithm always terminates.


Solutions


Fundamental solution via continued fractions

Let h_i/k_i denote the unique sequence of convergents of the regular continued fraction for \sqrt. Then the pair of positive integers (x_1, y_1) solving Pell's equation and minimizing ''x'' satisfies ''x''1 = ''hi'' and ''y''1 = ''ki'' for some ''i''. This pair is called the ''fundamental solution''. The sequence of integers _0; a_1,a_2,\ldots/math> in the regular continued fraction of \sqrt is always eventually periodic. It can be written in the form \left lfloor\sqrt\rfloor;\;\overline\right/math>, where \lfloor\, \cdot\, \rfloor denotes integer floor, and the sequence a_1,a_2,\ldots,a_, 2\lfloor\sqrt\rfloor repeats infinitely. Moreover, the tuple (a_1,a_2,\ldots,a_) is palindromic, the same left-to-right or right-to-left. The fundamental solution is (x_1, y_1)=\begin (h_, k_),&\textr\text\\ (h_,k_),&\textr\text\end 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 (x_1, y_1). However, this is not a polynomial-time algorithm because the number of digits in the solution may be as large as , far larger than a polynomial in the number of digits in the input value ''n''..


Additional solutions from the fundamental solution

Once the fundamental solution is found, all remaining solutions may be calculated algebraically from x_k + y_k \sqrt n = (x_1 + y_1 \sqrt n)^k, expanding the right side, equating coefficients of \sqrt on both sides, and equating the other terms on both sides. This yields the
recurrence relation In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
s x_ = x_1 x_k + n y_1 y_k, y_ = x_1 y_k + y_1 x_k.


Concise representation and faster algorithms

Although writing out the fundamental solution (''x''1, ''y''1) 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 x_1+y_1\sqrt n = \prod_^t \left(a_i + b_i\sqrt n\right)^ using much smaller integers ''a''''i'', ''b''''i'', and ''c''''i''. For instance, Archimedes' cattle problem is equivalent to the Pell equation x^2 - 410\,286\,423\,278\,424\ y^2 = 1, the fundamental solution of which has digits if written out explicitly. However, the solution is also equal to x_1 + y_1 \sqrt n = u^, where u = x'_1 + y'_1 \sqrt = (300\,426\,607\,914\,281\,713\,365\ \sqrt + 84\,129\,507\,677\,858\,393\,258\ \sqrt)^2 and x'_1 and y'_1 only have 45 and 41 decimal digits respectively. Methods related to the quadratic sieve approach for
integer factorization In mathematics, integer factorization is the decomposition of a positive integer into a product of integers. Every positive integer greater than 1 is either the product of two or more integer factors greater than 1, in which case it is a comp ...
may be used to collect relations between prime numbers in the number field generated by 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 The Riemann hypothesis is one of the most important conjectures in mathematics. It is a statement about the zeros of the Riemann zeta function. Various geometrical and arithmetical objects can be described by so-called global ''L''-functions, whi ...
, it can be shown to take time \exp O\left(\sqrt\right), where ''N'' = log ''n'' is the input size, similarly to the quadratic sieve.


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. 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.


Example

As an example, consider the instance of Pell's equation for ''n'' = 7; that is, x^2 - 7y^2 = 1. The continued fraction of \sqrt has the form ;\ \overline/math>. Since the period has length 4, 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: ;\ 1,1,1\frac. The sequence of convergents for the square root of seven are
:
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 (''x'') and (''y'') in OEIS) For the Pell's equation x^2 - 13y^2 = 1, the continued fraction \sqrt= ;\ \overline/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 ;\ 1,1,1,1,6,1,1,1,1\frac. Thus, the fundamental solution is (x_1, y_1)=(649, 180). The smallest solution can be very large. For example, the smallest solution to x^2 - 313y^2 = 1 is (, ), and this is the equation which Frenicle challenged Wallis to solve. Values of ''n'' such that the smallest solution of x^2 - ny^2 = 1 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, ... . (For these records, see for ''x'' and for ''y''.)


List of fundamental solutions of Pell's equations

The following is a list of the fundamental solution to x^2 - n y^2 = 1 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 and those of ''y'' are sequence in OEIS.


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 In mathematics, an algebraic number is a number that is a root of a function, root of a non-zero polynomial in one variable with integer (or, equivalently, Rational number, rational) coefficients. For example, the golden ratio (1 + \sqrt)/2 is ...
s, as the formula x^2 - n y^2 = (x + y\sqrt n)(x - y\sqrt n) is the norm for the ring \mathbb sqrt/math> and for the closely related
quadratic field In algebraic number theory, a quadratic field is an algebraic number field of Degree of a field extension, degree two over \mathbf, the rational numbers. Every such quadratic field is some \mathbf(\sqrt) where d is a (uniquely defined) square-free ...
\mathbb(\sqrt). Thus, a pair of integers (x, y) solves Pell's equation if and only if x + y \sqrt is a unit with norm 1 in \mathbb sqrt/math>. Dirichlet's unit theorem, that all units of \mathbb sqrt/math> 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's 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 mentions a connection between Pell's equation and the
Chebyshev polynomials The Chebyshev polynomials are two sequences of orthogonal polynomials related to the cosine and sine functions, notated as T_n(x) and U_n(x). They can be defined in several equivalent ways, one of which starts with trigonometric functions: ...
: If T_i(x) and U_i(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 In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring formed from the set of polynomials in one or more indeterminates (traditionally also called variables) with coefficients in another ring, ...
R /math>, with n = x^2 - 1: T_i^2 - (x^2-1) U_^2 = 1. Thus, these polynomials can be generated by the standard technique for Pell's equations of taking powers of a fundamental solution: T_i + U_ \sqrt = (x + \sqrt)^i. It may further be observed that if (x_i, y_i) are the solutions to any integer Pell's equation, then x_i = T_i (x_1) and y_i = y_1 U_ (x_1).


Continued fractions

A general development of solutions of Pell's equation x^2 - n y^2 = 1 in terms of
continued fraction A continued fraction is a mathematical expression that can be written as a fraction with a denominator that is a sum that contains another simple or continued fraction. Depending on whether this iteration terminates with a simple fraction or not, ...
s of \sqrt 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 In mathematics, a quadratic irrational number (also known as a quadratic irrational or quadratic surd) is an irrational number that is the solution to some quadratic equation with rational coefficients which is irreducible over the rational numb ...
s. The relationship to the continued fractions implies that the solutions to Pell's equation form a
semigroup In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative internal binary operation on it. The binary operation of a semigroup is most often denoted multiplicatively (just notation, not necessarily th ...
subset of the
modular group In mathematics, the modular group is the projective special linear group \operatorname(2,\mathbb Z) of 2\times 2 matrices with integer coefficients and determinant 1, such that the matrices A and -A are identified. The modular group acts on ...
. Thus, for example, if ''p'' and ''q'' satisfy Pell's equation, then \begin p & q \\ nq & p \end is a matrix of unit
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
. 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''''k''−1/''q''''k''−1 and ''p''''k''/''q''''k'' are two successive convergents of a continued fraction, then the matrix \begin p_ & p_ \\ q_ & q_ \end has determinant (−1)''k''.


Smooth numbers

Størmer's theorem applies Pell equations to find pairs of consecutive
smooth number In number theory, an ''n''-smooth (or ''n''-friable) number is an integer whose prime factors are all less than or equal to ''n''. For example, a 7-smooth number is a number in which every prime factor is at most 7. Therefore, 49 = 72 and 15750 = 2 ...
s, positive integers whose prime factors are all smaller than a given value. 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 A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
that does not divide ''n''.


The negative Pell's equation

The negative Pell's equation is given by x^2 - n y^2 = -1 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.This is because the Pell equation implies that −1 is a
quadratic residue In number theory, an integer ''q'' is a quadratic residue modulo operation, modulo ''n'' if it is Congruence relation, congruent to a Square number, perfect square modulo ''n''; that is, if there exists an integer ''x'' such that :x^2\equiv q \pm ...
modulo ''n''.
Thus, for example, ''x''2 − 3 ''y''2 = −1 is never solvable, but ''x''2 − 5 ''y''2 = −1 may be. The first few numbers ''n'' for which ''x''2 − ''n y''2 = −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, ... with infinitely many solutions. The solutions of the negative Pell's equation for 1 \le n \le 298 are: Let \alpha = \Pi_ (1 - 2^j). 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 ''α''. When the number of prime divisors is not fixed, the proportion is given by 1 − ''α.'' 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: (x^2 - n y^2)^2 = (-1)^2 implies >(x^2 + n y^2)^2 - n(2xy)^2 = 1. 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 (x + y\sqrt)(x - y\sqrt) = -1, the next solution is determined in terms of i(x_k + y_k\sqrt) = (i(x + y\sqrt))^k whenever there is a match, that is, when k is odd. The resulting recursion relation is (modulo a minus sign, which is immaterial due to the quadratic nature of the equation) x_k = x_ x_1^2 + n x_ y_1^2 + 2 n y_ y_1 x_1, y_k = y_ x_1^2 + n y_ y_1^2 + 2 x_ y_1 x_1, which gives an infinite tower of solutions to the negative Pell's equation (except for n = 1).


Generalized Pell's equation

The equation x^2 - n y^2 = N is called the generalized (or general) Pell's equation. The equation u^2 - n v^2 = 1 is the corresponding Pell's resolvent. A recursive algorithm was given by Lagrange in 1768 for solving the equation, reducing the problem to the case , N, < \sqrt. Such solutions can be derived using the continued-fractions method as outlined above. If (x_0, y_0) is a solution to x^2 - n y^2 = N, and (u_k, v_k) is a solution to u^2 - n v^2 = 1, then (x_k, y_k) such that x_k + y_k \sqrt = \big(x_0 + y_0 \sqrt\big)\big(u_k + v_k \sqrt\big) is a solution to x^2 - n y^2 = N, a principle named the ''multiplicative principle''. The solution (x_k, y_k) is called a ''Pell multiple'' of the solution (x_0, y_0). There exists a finite set of solutions to x^2 - n y^2 = N such that every solution is a Pell multiple of a solution from that set. In particular, if (u, v) is the fundamental solution to u^2 - n v^2 = 1, then each solution to the equation is a Pell multiple of a solution (x, y) with , x, \le \tfrac \sqrt \left(\sqrt + 1\right) and , y, \le \tfrac \sqrt \left(\sqrt + 1\right) , where U = u + v \sqrt n. If ''x'' and ''y'' are positive integer solutions to the Pell's equation with , N, < \sqrt n, then x/y is a convergent to the continued fraction of \sqrt n. Solutions to the generalized Pell's equation are used for solving certain
Diophantine equation ''Diophantine'' means pertaining to the ancient Greek mathematician Diophantus. A number of concepts bear this name: *Diophantine approximation In number theory, the study of Diophantine approximation deals with the approximation of real n ...
s and
units Unit may refer to: General measurement * Unit of measurement, a definite magnitude of a physical quantity, defined and adopted by convention or by law **International System of Units (SI), modern form of the metric system **English units, histo ...
of certain rings, and they arise in the study of SIC-POVMs in
quantum information theory Quantum information is the information of the state of a quantum system. It is the basic entity of study in quantum information theory, and can be manipulated using quantum information processing techniques. Quantum information refers to both t ...
. The equation x^2 - n y^2 = 4 is similar to the resolvent x^2 - n y^2 = 1 in that if a minimal solution to x^2 - n y^2 = 4 can be found, then all solutions of the equation can be generated in a similar manner to the case N = 1. For certain n, solutions to x^2 - n y^2 = 1 can be generated from those with x^2 - n y^2 = 4, in that if n \equiv 5 \pmod, then every third solution to x^2 - n y^2 = 4 has x, y even, generating a solution to x^2 - n y^2 = 1.


Notes


References


Further reading

* * * * * *


External links

* *
Pell equation solver
(''n'' has no upper limit)

(''n'' < 1010, can also return the solution to ''x''2 − ''ny''2 = ±1, ±2, ±3, and ±4) {{DEFAULTSORT:Pell's Equation Diophantine equations Continued fractions