## Task B-1.2.

Determine all natural numbers $a$ and $n$ such that

$$
a^{n}+a^{n+1}+a^{n+2}+a^{n+3}+a^{n+4}+a^{n+5}=2016
$$
## Solution.

Let's write the given expression in the form

$$
\begin{aligned}
a^{n}\left(1+a^{1}+a^{2}+a^{3}+a^{4}+a^{5}\right) & =2016 \quad \text { or } \\
a^{n}\left(\frac{a^{6}-1}{a-1}\right) & =2016
\end{aligned}
$$

Obviously, $a \neq 1$.

If $a=2$, the given expression becomes

$$
2^{n}\left(\frac{2^{6}-1}{2-1}\right)=2016
$$

or

$$
2^{n} \cdot 63=2016, \quad 2^{n}=32 \quad \text { so } \quad n=5
$$

If $a=3$, we get the equation $3^{n} \cdot 364=2016$ which has no integer solutions.

If $a=4$, we have $4^{n} \cdot 1365=2016$. Such a natural number $n$ does not exist. Note that $4^{n} \cdot 1365 \geq 4 \cdot 1365=5460>2016, \forall n \in \mathbb{N}$.

Since the value of the expression

$$
a^{n}\left(\frac{a^{6}-1}{a-1}\right)
$$

increases for all natural numbers $a$ and $n$, its value is greater than 2016 for all $a \geq 4$, so the given equation has no solutions.

Therefore, the only solution is $a=2, n=5$.