Two numbers $a, b$ are selected from the set

50 Views Asked by At

Two numbers $a, b$ are selected from the set {0, 1, 2, 3,....98, 99}. What is the probability that the integer $3^a + 7^b$ ends up with the number $8$ ?

My problem is how do I find favourable cases.

2

There are 2 best solutions below

3
On

The problem is equivalent to pick two integers whose last two digits are as such... (so, we don't have to deal with the situations of the boundaries). To make $3^a+7^b$ end with 8, the only possibilities are a=0 and b=1 mod 4, and a=3 and b=0 mod 4, whose probability is $(\frac1 4*\frac1 4)*2=\frac 1 8$.

0
On

Note that: $$3^a\equiv \color{red}1,3,9,\color{blue}7 \pmod {10};\\ 7^b\equiv \color{blue}1,\color{red}7,9,3 \pmod{10};\\ 3^a+7^b\equiv \color{red}1+\color{red}7\equiv \color{blue}7+\color{blue}1\equiv 0\pmod{8}.$$

Also note that for $a,b\in \{0,1,2,3,4,5,6,7,8,...,96,97,98,99\}$: $$\color{red}{A}=\{0,4,8,...,96\} \Rightarrow n(\color{red}{A})=25;\\ \color{red}{B}=\{1,5,9,...,97\} \Rightarrow n(\color{red}{B})=25;\\ \color{blue}{A}=\{3,7,11,...,99\} \Rightarrow n(\color{blue}{A})=25;\\ \color{blue}{B}=\{0,4,8,12,...,96\} \Rightarrow n(\color{blue}{B})=25.$$ Hence: $$\frac{{\color{red}{25}\choose 1}{\color{red}{25}\choose 1}+{\color{blue}{25}\choose 1}{\color{blue}{25}\choose 1}}{{100\choose 1}{100\choose 1}}=\frac{2\cdot 25^2}{100^2}=\frac18=0.125.$$