## Subject III. (20 points)

Seven is one of the numbers considered magical throughout human history: there are 7 wonders of the ancient world, 7 wonders of the Middle Ages, 7 continents, 7 seas, the rainbow has 7 colors, 7 days of the week named after the 7 Roman gods who in turn were named after the 7 planets that could be observed with the naked eye, the ladybug has seven spots, 7 musical notes, etc.

Write the number $a=1+6+6 \cdot 7+6 \cdot 7^{2}+\ldots+6 \cdot 7^{776}$ using only four 7s. Find the last digit of this number.

Prof. Vasile Şerdean, Şcoala Gimnazială nr. 1 Gherla
Subject III.

$$
\begin{aligned}
& a=1+6 \cdot\left(1+7+7^{2}+\ldots+7^{776}\right)=7^{777} \\
& u\left(7^{777}\right)=7
\end{aligned}
$$

(5 points)