Let $m,n$ be $2$ numbers between $1-100$ . what is the probability that if we select any two random numbers then $5|(7^m+7^n)$ . My attempt last digit should be $5$ or $0$ so $7$ powers follow the pattern $7,9,3,1,7...$ so $m,n$ should be such that if one gives $7$ as last digit other should give $3$ as last digit. Same for $9,1$ . but this will take time and it was asked in a competitive exam with little space for Rough work so i believe there exists a simple logical way. Hope you guys help.
2026-04-17 22:33:10.1776465190
On
On
probability of divisibility by $5$
51 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
As you would have noticed by now, $7^k\equiv7^{k\bmod4}$.
And as you noted, $5|(7^m+7^n)\iff|m-n|\equiv2\pmod4$.
The probability for that in the case of $m,n\in\mathbb{N}$ is obviously $\frac14$.
Since $4|100$, the probability in the case of $m,n\in[1,100]$ is also $\frac14$.
0
On
We know that $7^4\equiv 1\mod 5$ (by little Fermat's theorem). Now, if $n=4k\to 7^n\equiv 1 \mod 5$, if $n=4k+1\to 7^n\equiv 2 \mod 5$, if $n=4k+2\to 7^n\equiv -1 \mod 5$ and if $n=4k+3\to 7^n\equiv 3 \mod 5$.
We have two possibilities: $n=4k$ and $m=4k+2$ or $n=4k+1$ and $m=4k+3$. (And symmetric)
The probability is $\frac{2(25*25+25*25)}{100*100}=1/4$
You already found that the last digit of $7^k$ repeats with period $4$.
In particular, computed modulo 5, the remainders of $7^k$ are $\{1,2,3,4\}$ and since $100 = 4\cdot 25$ they are equidistributed.
Now, for every possible value of $7^m\pmod 5$ there is only a possible value of $7^n\pmod 5$ such that the sum will be a multiple of $5$, i.e., $1+4$, $2+3$, $3+2$ and $4+1$.
Since all the residues are distributed evenly, we can conclude that the probability is thus $\frac{1}{4}$.