3 #39 Pell's equation
Natural-number solutions of Pell's equation \(x^2 - Dy^2 = 1\). If there is a smallest solution with \(y \neq 0\), namely \((a, b)\) (the fundamental solution), then all solutions are obtained by the recurrence \(x_{n+1} = a x_n + D b\, y_n,\ y_{n+1} = b x_n + a\, y_n\). (The existence of the fundamental solution itself is not shown in this book.)
Outline of the proof: divide a solution \((x, y)\) by the "inverse" of the fundamental solution to descend to a smaller solution \((x', y')\) (by strong induction on \(y\)). The descent needs the order of squares of natural numbers (\(u \le v \iff u^2 \le v^2\)).
3.1 Order of squares
For natural numbers \(u, v\), \(u \le v\) and \(u^2 \le v^2\) are equivalent (used in the descent of Pell solutions).
Lsqa …
\(u , v \in \mathbb{M} , u \le v \Longrightarrow u \cdot u \le v \cdot v\) \(\blacktriangleleft\) L⋅≤ ,L≤t ,⋅𝕄:D ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0XLsqb …
\(u , v \in \mathbb{M} , v < u \Longrightarrow v \cdot v < u \cdot u\) \(\blacktriangleleft\) Lsqa ,Lz0 ,𝕄⋅≠0 ,≤.' ,<.' ,L≤< ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:DLsqc …
\(u , v \in \mathbb{M} , u \cdot u \le v \cdot v \Longrightarrow u \le v\) \(\blacktriangleleft\) Ltot ,Lsqb ,L≤< ,L<+1 ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:DLsqd …
\(u , v \in \mathbb{M} , u \cdot u < v \cdot v \Longrightarrow u < v\) \(\blacktriangleleft\) Ltot ,Lsqa ,L≤< ,L<+1 ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:D3.2 Generating the solutions
From the smallest natural-number solution of \(x^2 - Dy^2 = 1\) with \(y \neq 0\), \((a, b)\) (the fundamental solution), all solutions are obtained by \(x_{n+1} = a x_n + D b\, y_n,\ y_{n+1} = b x_n + a\, y_n\). First, every \((x_n, y_n)\) of this recurrence is a solution.
Pell𝕄 …
\(\begin{cases} f ( 0 ) = 1 \\ g ( 0 ) = 0 \\ n \in \mathbb{M} \Longrightarrow f ( n + 1 ) = a \cdot f ( n ) + ( D \cdot b ) \cdot g ( n ) \\ n \in \mathbb{M} \Longrightarrow g ( n + 1 ) = b \cdot f ( n ) + a \cdot g ( n ) \end{cases}\) Lpell1 …
\(D , a , b \in \mathbb{M} , a \cdot a = D \cdot ( b \cdot b ) + 1 , n \in \mathbb{M} \Longrightarrow f ( n ) \in \mathbb{M} , g ( n ) \in \mathbb{M} , f ( n ) \cdot f ( n ) = D \cdot ( g ( n ) \cdot g ( n ) ) + 1\) \(\blacktriangleleft\) Pq1 ,Pq2 ,Pq3 ,Pq5 ,Pell𝕄 ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:D3.3 Every solution is obtained
Divide a solution \((x, y)\) (\(y \neq 0\)) by the "inverse" of the fundamental solution \((a, b)\): \(x' = ax - Dby,\ y' = ay - bx\). If \(b \le y\), then \(x', y'\) are natural numbers and \((x', y')\) is also a solution, with \(y' < y\). Repeat this by strong induction on \(y\).
Lpell2 …
\(D , a , b \in \mathbb{M} , a \cdot a = D \cdot ( b \cdot b ) + 1 , b \neq 0 , \forall x \in \mathbb{M} . \forall y \in \mathbb{M} . ( x \cdot x = D \cdot ( y \cdot y ) + 1 , y \neq 0 \Longrightarrow b \le y ) \Longrightarrow \forall y \in \mathbb{M} . \forall x \in \mathbb{M} . ( x \cdot x = D \cdot ( y \cdot y ) + 1 \Longrightarrow \exists n \in \mathbb{M} . x = f ( n ) , y = g ( n ) )\) \(\blacktriangleleft\) 1. ,L≤0 ,L≤s ,Cnc ,Q6f ,Q7a ,Q7b ,Pell𝕄 ,Lsqa ,Lsqc ,Lsqd ,Lz0 ,𝕄⋅≠0 ,≤.' ,𝕄0-' ,SIND ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:D3.4 Main theorem
If there is a fundamental solution \((a, b)\) (a solution with \(b \neq 0\) and the smallest \(y\)), then the natural-number solutions of \(x^2 = Dy^2 + 1\) are exactly the \((x_n, y_n)\) of the recurrence. (The existence of the fundamental solution itself is not shown here.)
\(D , a , b \in \mathbb{M} , a \cdot a = D \cdot ( b \cdot b ) + 1 , b \neq 0 , \forall x \in \mathbb{M} . \forall y \in \mathbb{M} . ( x \cdot x = D \cdot ( y \cdot y ) + 1 , y \neq 0 \Longrightarrow b \le y ) \Longrightarrow \forall x \in \mathbb{M} . \forall y \in \mathbb{M} . ( x \cdot x = D \cdot ( y \cdot y ) + 1 \Longleftrightarrow \exists n \in \mathbb{M} . x = f ( n ) , y = g ( n ) )\) \(\blacktriangleleft\) Lpell1 ,Lpell2 ,Pell𝕄 ,Lsqa ,Lsqc ,Lsqd ,Lz0 ,𝕄⋅≠0 ,≤.' ,𝕄0-' ,SIND ,\(\mathbb{W}.\) ,Axℤ ,⋅∈𝕄 ,⋅0X ,⋅𝕄:D