---
tag: 0J1TT091TN
kind: statement
role: theorem
name: Solutions of Pell's equation are powers of the fundamental solution
msc: [11D09]
uses: [0AF3DANJ76, 0KCYJSB9FW]
sources:
  - url: https://en.wikipedia.org/wiki/Pell%27s_equation
    locator: Additional solutions from the fundamental solution
---

## Statement

Let $d$ be a positive integer that is not a perfect square, and let $(x_1, y_1)$ be the [[fundamental solution|0KCYJSB9FW]] of $x^2 - d y^2 = 1$.
Let $x$ and $y$ be integers with $x \ge 1$, $y \ge 0$ and $x^2 - d y^2 = 1$.
Then there is a unique natural number $n$ with $x + y \sqrt{d} = (x_1 + y_1 \sqrt{d})^n$.

## Remarks

Conversely, each power $(x_1 + y_1 \sqrt{d})^n = x_n + y_n \sqrt{d}$ gives a solution $(x_n, y_n)$.
The integer solutions are exactly the pairs with $x + y \sqrt{d} = \pm (x_1 + y_1 \sqrt{d})^n$ for $n \in \mathbb{Z}$.
For $d = 2$: $(3 + 2\sqrt{2})^2 = 17 + 12 \sqrt{2}$, so $(17, 12)$ is the next solution after $(3, 2)$.
In algebraic terms, the units of norm $1$ in $\mathbb{Z}[\sqrt{d}]$ form the group $\{\pm 1\} \times \mathbb{Z}$.

## Explanations

### L1 human

Once you know the smallest solution, you get all the others by taking powers.
Expand $(x_1 + y_1 \sqrt{d})^n$ and read the integer part and the coefficient of $\sqrt{d}$.
