## Task B-4.5.

If a natural number $n$ when divided by 5 gives a remainder of 2, what remainder does $n^{7}$ give when divided by 5?
## First solution.

Since $n$ when divided by 5 gives a remainder of 2, it follows that:

$n$ ends in the digit 2 or 7; 1 point

$n^{2}$ ends in the digit 4 or 9; 1 point

$n^{3}$ ends in the digit 8 or 3; 1 point

$n^{4}$ ends in the digit 6 or 1; 1 point

$n^{7}=n^{3} \cdot n^{4}$ ends in the digit 8 or 3.

From the previous line, it follows that $n^{7}$ when divided by 5 gives a remainder of 3.