## Task 4 - 261244

Determine the smallest positive integer $a$ for which $(a+1)^{5}-a^{5}-1$ is divisible by 18305.
For every positive integer $a$,

$$
(a+1)^{5}-a^{5}-1=5 a\left(a^{3}+2 a^{2}+2 a+1\right)=5 a(a+1)\left(a^{2}+a+1\right)
$$

is divisible by $18305=5 \cdot 7 \cdot 523$ if and only if

$$
a(a+1)\left(a^{2}+a+1\right) \quad \text { is divisible by } 7 \cdot 523
$$

where 523 is a prime number (2); because 523 is not divisible by any of the numbers 2, 3, 5, 7, 11, 13, 17, 19, and $23^{2}>523$.

One can first try to determine $a$ such that $a^{2}+a+1$ is divisible by 523 (3), i.e., there exists a positive integer $k$ with

$$
a^{2}+a+1=523 k
$$

If this equation is solvable, then for $a>0$,

$$
a=-\frac{1}{2}+\frac{1}{2} \sqrt{523 \cdot 4 k-3}
$$

then $523 \cdot 4 k-3$ must be an odd perfect square. This leads to the following sequence of conclusions:

1. $2092 k-3$ has one of the units digits 1, 5, 9;
2. $2092 k$ has one of the units digits 4, 8, 2;
3. $k$ has one of the units digits 2, 7, 4, 9, 1, 6.

Moreover, since $a^{2}+a+1=a(a+1)+1$ is an odd number, $k$ must also be odd and thus has one of the units digits 1, 7, 9. Considering such numbers $k$ in sequence, it is shown:

For $k=1$, $523 \cdot 4 k-3=2089$ is not a perfect square because $45^{2}<2089<46^{2}$.

For $k=7$, $523 \cdot 4 k-3=14641=121^{2}$, so according to (5), $a=60$.

Thus, it is shown: For $a=60$,

$$
a^{2}+a+1=523 \cdot 7
$$

and $k=7$ in (4) is the smallest positive integer, and thus $a=60$ is the smallest positive integer for which (3) holds.

Due to (6), $a=60$ satisfies (1). For all positive integers $a<60$, it follows from $0<a, a+1<523$ and from (7) and (2) that these $a$ do not satisfy (1).

The smallest number with the properties mentioned in the problem is thus $a=60$.