Determine the probability that for a randomly chosen integer…
Determine the probability that for a randomly chosen integer $N$ the following will end in the digit $1$:
$1^{\circ}$ its square;
$2^{\circ}$ its fourth power;
$3^{\circ}$ the number obtained by multiplying $N$ by an arbitrary (randomly chosen) integer.
Explanation of Method
The last digit of a square, a power or a product depends only on the last digits of the numbers involved. For a randomly chosen integer each last digit $0,1,\dots,9$ is equally likely (probability $\tfrac1{10}$). So we make a table of last digits, count the favourable digits, and divide by $10$. In part $3^{\circ}$ two random integers are involved, so there are $10\cdot10=100$ equally likely pairs of last digits.
Step 1: Only the last digit matters
Write $N = 10q + d$ with last digit $d\in\{0,\dots,9\}$. Then
\[ N^2 = 100q^2 + 20qd + d^2, \]
and every term except $d^2$ is a multiple of $10$. So $N^2$ and $d^2$ have the same last digit; the same holds for any power and for products. For a randomly chosen integer the ten last digits are equally likely.
Step 2: $1^{\circ}$ — the square
| Last digit $d$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ | $8$ | $9$ |
|---|---|---|---|---|---|---|---|---|---|---|
| Last digit of $d^2$ | $0$ | 1 | $4$ | $9$ | $6$ | $5$ | $6$ | $9$ | $4$ | 1 |
The square ends in $1$ only for $d=1$ ($1^2=1$) and $d=9$ ($9^2=81$): $2$ favourable digits.
\[ \boxed{P_1 = \frac{2}{10} = 0.2.} \]
Step 3: $2^{\circ}$ — the fourth power
$N^4 = (N^2)^2$, so take the last digit of the square and square it again:
| Last digit $d$ | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ | $8$ | $9$ |
|---|---|---|---|---|---|---|---|---|---|---|
| Last digit of $d^4$ | $0$ | 1 | $6$ | 1 | $6$ | $5$ | $6$ | 1 | $6$ | 1 |
The fourth power ends in $1$ for $d = 1, 3, 7, 9$ (e.g. $3^4=81$, $7^4=2401$): $4$ favourable digits.
\[ \boxed{P_2 = \frac{4}{10} = 0.4.} \]
These are exactly the digits not divisible by $2$ or $5$; every such number satisfies $d^4\equiv 1 \pmod{10}$.
Step 4: $3^{\circ}$ — the product with a random integer
Now $N$ is multiplied by another randomly chosen integer $M$. The last digit of $NM$ is the last digit of $d\cdot e$, where $d$ and $e$ are the last digits of $N$ and $M$. All $10\cdot10=100$ pairs $(d,e)$ are equally likely. Which pairs give a product ending in $1$?
| $d$ | $e$ | $d\cdot e$ |
|---|---|---|
| $1$ | $1$ | $1$ |
| $3$ | $7$ | $21$ |
| $7$ | $3$ | $21$ |
| $9$ | $9$ | $81$ |
If $d$ is even or $5$, the product is even or a multiple of $5$ and cannot end in $1$. For each of $d=1,3,7,9$ exactly one $e$ works. So there are $4$ favourable pairs:
\[ \boxed{P_3 = \frac{4}{100} = 0.04.} \]
Step 5: A different reading of part $3^{\circ}$
If the question is instead "can $N$ be multiplied by some integer so that the result ends in $1$?", the answer is yes exactly when $d\in\{1,3,7,9\}$, with probability $0.4$. With the natural reading "multiplied by an arbitrary (random) integer", both factors are random and the answer is $0.04$.
Result
| Part | Favourable / all | Probability |
|---|---|---|
| $1^{\circ}$ $N^2$ ends in 1 | $d\in\{1,9\}$: $2/10$ | $0.2$ |
| $2^{\circ}$ $N^4$ ends in 1 | $d\in\{1,3,7,9\}$: $4/10$ | $0.4$ |
| $3^{\circ}$ $NM$ ends in 1 | pairs $(1,1),(3,7),(7,3),(9,9)$: $4/100$ | $0.04$ |