What is the remainder of the division of $2^{2015}$ by 20? Well, it's difficult to perform this division directly using just paper and pen. Let's look for a way to get such an answer by analyzing the remainders of powers of 2 by 20, hoping to find some pattern in them. What is the remainder that $2^{5}$ leaves when divided by 20?

$$
2^{5}=32=1 \cdot 20+12
$$

Knowing this, it's easy to find the remainder of $2^{6}$ when divided by 20, since

$$
2^{6}=2 \cdot 2^{5}=2 \cdot(1 \cdot 20+12)=2 \cdot 20+24
$$

Since 24 is greater than 20 and cannot be a remainder, we should write

$$
2^{6}=3 \cdot 20+4
$$

We can extend the previous argument concluding that to know the remainder of $2^{i+1}$ when divided by 20, it is enough to know the remainder of the product of the remainder of $2^{i}$ when divided by 20. Thus, we can build the sequence of powers and remainders when divided by 20.

$$
\begin{array}{cllllll}
n & 2^{1} & 2^{2} & 2^{3} & 2^{4} & 2^{5} & 2^{6} \\
\text { Remainder by 20 } & 2 & 4 & 8 & 16 & 12 & 4
\end{array}
$$

(a) Determine the remainders that the numbers $2^{7}, 2^{10} \text{ and } 2^{13}$ leave when divided by 20.

(b) Knowing that the remainders repeat periodically, determine the period of repetition, that is, the number of distinct remainders that keep repeating.

(c) We return to the question at the beginning of the problem. What is the remainder that $2^{2015}$ leaves when divided by 20?
Solution

(a) Let's continue to calculate the remainders of the division up to 13.

$$
\begin{array}{clllllllllllll}
n & 2^{1} & 2^{2} & 2^{3} & 2^{4} & 2^{5} & 2^{6} & 2^{7} & 2^{8} & 2^{9} & 2^{10} & 2^{11} & 2^{12} & 2^{13} \\
\text { Remainder by 20 } & 2 & 4 & 8 & 16 & 12 & 4 & 8 & 16 & 12 & 4 & 8 & 16 & 12
\end{array}
$$

Therefore, the sought remainders are 8, 4, and 12.
(b) The remainders start to repeat from $2^{2}$ and every four consecutive powers. Therefore, the period is 4 and the remainders that keep repeating are: 4, 8, 16, and 12.

(c) Since the repetition period is 4, it is enough to observe the remainder in the division of 2015 by 4. Since this remainder is 3, we conclude that when dividing the number $2^{2015}$ by 20, we get a remainder equal to 8.