
3. Find all positive integers $n$ such that $\left(2^{n}+1\right)\left(3^{n}+2\right)$ is divisible by $5^{n}$.

(Ján Mazák)


Solution. The following table shows $2^{n}+1$ and $3^{n}+2$ modulo 5 (we know, that both sequences modulo 5 have to be periodic):

| $n$ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | $\ldots$ |
| ---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $2^{n}+1$ | 3 | 5 | 9 | 17 | 33 | 65 | 129 | 257 | $\ldots$ |
| modulo 5 | 3 | 0 | 4 | 2 | 3 | 0 | 4 | 2 | $\ldots$ |
| $3^{n}+2$ | 5 | 11 | 29 | 83 | 245 | 731 | 2189 | 6563 | $\ldots$ |
| modulo 5 | 0 | 1 | 4 | 3 | 0 | 1 | 4 | 3 | $\ldots$ |

Both sequences modulo 5 are periodic with period 4 . But $2^{n}+1$ is divisible by 5 iff $n$ is 2 modulo 4 , and $3^{n}+2$ is divisible by 5 iff $n$ is 1 modulo 4 . Thus if $5^{n}$ should divide $\left(2^{n}+1\right)\left(3^{n}+2\right)$, it has to divide one of the factors. But for $n \geqslant 2$ obviously $5^{n}>3^{n}+2$ and $5^{n}>2^{n}+1$ and $5^{n}$ cannot divide any of the factors. For $n=1$ we have $5^{1} \mid\left(2^{1}+1\right)\left(3^{1}+2\right)=15$, thus $n=1$ is the unique solution of the problem.

## Second Round of the 61st Czech and Slovak  Mathematical Olympiad  (January 17th, 2012)

$\mathbb{N} /$ 行
