TITLE: Probability that $2^a+3^b+5^c$ is divisible by 4
QUESTION [11 upvotes]: If $a,b,c\in{1,2,3,4,5}$, find the probability that $2^a+3^b+5^c$ is divisible by 4.

For a number to be divisible by $4$, the last two digits have to be divisible by $4$
$5^c= \_~\_25$ if $c>1$
$3^1=3,~3^2=9,~3^3=27,~3^4=81,~ 3^5=243$
$2^1=2,~2^2=4,~2^3=8,~2^4=16,~2^5=32$
Should I add all possibilities? Is there a simpler method?

REPLY [2 votes]: $2^{\color\red{a}}+3^\color\green{b}+5^\color\magenta{c}\equiv0\pmod4\iff$

$\Big(\big(\color\red{a}=1\big)\wedge\big((\color\green{b}=2)\vee(\color\green{b}=4)\big)\Big)\vee$
$\Big(\big(\color\red{a}\neq1\big)\wedge\big((\color\green{b}\neq2)\wedge(\color\green{b}\neq4)\big)\Big)$


Therefore, the probability is $\dfrac{\color\red1\cdot\color\green2\cdot\color\magenta5+(5-\color\red1)\cdot(5-\color\green2)\cdot\color\magenta5}{5\cdot5\cdot5}=\dfrac{14}{25}$