# Difference between revisions of "2017 AMC 10B Problems/Problem 14"

## Problem

An integer $N$ is selected at random in the range $1\leq N \leq 2020$ . What is the probablilty that the remainder when $N^{16}$ is divided by $5$ is $1$?

## Solution

By Fermat's Little Theorem, $N^{16} = (N^4)^4 \equiv 1 \text{ (mod 5)}$ when N is relatively prime to 5. However, this happens with probability $\boxed{\textbf{(D) } \frac 45}$.

## Solution 2

Note that the patterns for the units digits repeat, so in a sense we only need to find the patterns for the digits $0-9$ . The pattern for $0$ is $0$, no matter what power, so $0$ doesn't work. Likewise, the pattern for $5$ is always $5$. Doing the same for the rest of the digits, we find that the units digits of $1^{16}$, $2^{16}$ ,$3^{16}$, $4^{16}$ ,$6^{16}$, $7^{16}$ ,$8^{16}$ and $9^{16}$ all have the remainder of $1$ when divided by $5$ $\boxed{\textbf{(D) } \frac 45}$.