## Problem 4. (Proposed by Slovenia)

Find all positive integers $a$ and $b$ for which there are three consecutive integers at which the polynomial

$$
P(n)=\frac{n^{5}+a}{b}
$$

takes integer values.


Solution 1: Denote the three consecutive integers by $x-1, x$, and $x+1$, so that

$$
(x-1)^{5}+a \equiv 0 \quad(\bmod b), \quad x^{5}+a \equiv 0 \quad(\bmod b), \quad(x+1)^{5}+a \equiv 0 \quad(\bmod b)
$$

By computing the differences of the equations in (1) we get

$$
\begin{aligned}
& A:=(x+1)^{5}-(x-1)^{5}=10 x^{4}+20 x^{2}+2 \equiv 0 \quad(\bmod b) \\
& B:=(x+1)^{5}-x^{5}=5 x^{4}+10 x^{3}+10 x^{2}+5 x+1 \equiv 0 \quad(\bmod b)
\end{aligned}
$$

Adding the first and third equation in (1) and subtracting twice the second equation yields

$$
C:=(x+1)^{5}+(x-1)^{5}-2 x^{5}=20 x^{3}+10 x \equiv 0 \quad(\bmod b)
$$

Next, (2) and (4) together yield

$$
D:=4 x A-\left(2 x^{2}+3\right) C=-22 x \equiv 0 \quad(\bmod b)
$$

Finally we combine (3) and (5) to derive

$$
22 B+\left(5 x^{3}+10 x^{2}+10 x+5\right) D=22 \equiv 0 \quad(\bmod b)
$$

As the positive integer $b$ divides 22 , we are left with the four cases $b=1, b=2, b=11$ and $b=22$.

If $b$ is even (i.e. $b=2$ or $b=22$ ), then we get a contradiction from (3), because the integer $B=2\left(5 x^{3}+5 x^{2}\right)+5\left(x^{4}+x\right)+1$ is odd, and hence not divisible by any even integer.

For $b=1$, it is trivial to see that a polynomial of the form $P(n)=n^{5}+a$, with $a$ any positive integer, has the desired property.

For $b=11$, we note that

$$
\begin{aligned}
& n \equiv 0,1,2,3,4,5,6,7,8,9,10 \quad(\bmod 11) \\
& \Longrightarrow \quad n^{5} \equiv 0,1,-1,1,1,1,-1,-1,-1,1,-1 \quad(\bmod 11)
\end{aligned}
$$

Hence a polynomial of the form $P(n)=\left(n^{5}+a\right) / 11$ has the desired property if and only if $a \equiv \pm 1(\bmod 11)$. This completes the proof.

A Variant. We start by following the first solution up to equation (4). We note that $b=1$ is a trivial solution, and assume from now on that $b \geqslant 2$. As $(x-1)^{5}+a$ and $x^{5}+a$ have different parity, $b$ must be odd. As $B$ in (3) is a multiple of $b$, we conclude that (i) $b$ is not divisible by 5 and that (ii) $b$ and $x$ are relatively prime. As $C=10 x\left(2 x^{2}+1\right)$ in (4) is divisible by $b$, we altogether derive

$$
E:=2 x^{2}+1 \equiv 0 \quad(\bmod b)
$$

Together with (2) this implies that

$$
5 E^{2}+10 E-2 A=11 \equiv 0 \quad(\bmod b)
$$

Hence $b=11$ is the only remaining candidate, and it is handled as in the first solution.
