Find all positive integers $a, b$ for which $ab - 1 \mid a^2 + b^2$, and determine the value of $\frac{a^2 + b^2}{ab - 1}$.
- 1
Suppose $ab - 1 \mid a^2 + b^2$ with $ab > 1$, and let $k = \frac{a^2 + b^2}{ab - 1}$ be a fixed positive integer, so $a^2 + b^2 = k(ab - 1)$, i.e. $a^2 - (kb)\,a + (b^2 + k) = 0$. Among all positive-integer solutions of this equation for this $k$, choose one minimizing $a + b$, and label it so that $a \ge b \ge 1$.
- 2
Treat $a^2 - (kb)\,a + (b^2 + k) = 0$ as a quadratic in $a$ with the known integer root $a$. The second root is $a' = kb - a = \frac{b^2 + k}{a}$. The first form shows $a'$ is an integer; the second shows $a' > 0$ (as $b^2 + k > 0$), so $a'$ is a positive integer and $(a', b)$ is again a positive-integer solution with the same $k$.
- 3
Since $a + b$ was minimal over all solutions, $(a', b)$ cannot be smaller: $a' + b \ge a + b$, so $a' \ge a$. Equivalently $a\,a' = b^2 + k \ge a^2$, i.e. $k \ge a^2 - b^2$.
- 4
Now suppose for contradiction the minimal pair had $a > b \ge 2$. We compare $k$ with $a^2 - b^2$ directly: $(a^2 - b^2)(ab - 1) - (a^2 + b^2) = a\big(b(a-b)(a+b) - 2a\big)$, and since $a > b \ge 2$ we have $a - b \ge 1$ and $b \ge 2$, so $b(a-b)(a+b) \ge 2(a+b) > 2a$, making this positive. Hence $(a^2 - b^2)(ab - 1) > a^2 + b^2 = k(ab - 1)$, so $k < a^2 - b^2$ — contradicting $k \ge a^2 - b^2$ from the previous step. So the minimal pair cannot have $a > b \ge 2$.
- 5
The remaining possibilities for the minimal pair are $a = b$ or $b = 1$. If $a = b$ then $2a^2 = k(a^2 - 1)$, so $k = 2 + \frac{2}{a^2 - 1}$, which is an integer only if $(a^2 - 1) \mid 2$, i.e. $a^2 \in \{2, 3\}$ — impossible for an integer $a \ge 2$ (and $a = b = 1$ gives $ab - 1 = 0$). So the minimal pair has $b = 1$.
- 6
With $b = 1$ the equation is $a^2 + 1 = k(a - 1)$, so $(a - 1) \mid a^2 + 1 = (a - 1)(a + 1) + 2$, forcing $(a - 1) \mid 2$ and hence $a \in \{2, 3\}$. The base pairs are $(2, 1)$ and $(3, 1)$, giving $\frac{2^2 + 1}{2 \cdot 1 - 1} = 5$ and $\frac{3^2 + 1}{3 \cdot 1 - 1} = 5$. Every solution descends to one of these (and their reflections $(1,2),(1,3)$), so $k = 5$ for every solution.
Answer:All solutions satisfy $\frac{a^2 + b^2}{ab - 1} = 5$ (e.g. $(1,2), (1,3), (2,1), (3,1)$ and their jumps).