## Task A-4.4.

Determine all pairs of integers $(a, b)$ for which

$$
(7 a-b)^{2}=2(a-1) b^{2}
$$
## Solution.

Notice that $2(a-1)$ must be a square of an integer.

Therefore, we can write $a-1=2 k^{2}$, i.e., $a=2 k^{2}+1$ for some integer $k$.

Then $7 a-b= \pm 2 k b$, i.e., $7\left(2 k^{2}+1\right)-b= \pm 2 k b$. 2 points

Since we did not require that $k>0$, without loss of generality, we can assume that $7\left(2 k^{2}+1\right)-b=2 k b$.

Expressing $b$ in terms of $k$, we get

$$
b=\frac{7\left(2 k^{2}+1\right)}{2 k+1}
$$

Since $b$ must be an integer, $2 k+1$ must divide $7\left(2 k^{2}+1\right)$.

Since

$$
2 \cdot 7\left(2 k^{2}+1\right)=2 \cdot 7\left(2 k^{2}+1\right)-7+7=7\left(4 k^{2}-1\right)+21=7(2 k-1)(2 k+1)+21
$$

we conclude that $2 k+1$ divides $7\left(2 k^{2}+1\right)$ if and only if $2 k+1$ divides 21.

For each integer $k$ such that $2 k+1$ divides 21, the solution to the given equation is

$$
a=2 k^{2}+1, \quad b=\frac{7\left(2 k^{2}+1\right)}{2 k+1}
$$

There are a total of 8 solutions (one for each positive and negative divisor of 21), which for clarity we list as triples $(k, a, b)$: $(0,1,7),(1,3,7),(3,19,19)$, $(10,201,67),(-1,3,-21),(-2,9,-21),(-4,33,-33),(-11,243,-81)$.