Number Theory problem I am stuck on Problem: Bread randomly chooses $6$ positive integers $a, b, c, d, e, f.$ If the probability that $2^a+2^b+2^c+2^d+2^e+2^f$ is divisible by $5$ can be written as $m/n,$ where $m$ and $n$ are positive relatively prime integers, find $m+n.$
So for this problem I just got all the power of $2$ residues modulo $5,$ and I got them as $1, 2, 3, 4.$ Now I am stuck since I don't want to casework bash since that would be very nasty, does anyone have hints or solutions?
 A: To flesh out the hint in the comments:
First of all, I am rewriting the question to assume that $B$ is choosing from $\{1,2,3,4\}$ uniformly at random and independently.  This avoids the problem that there is no uniform distribution on the integers (so "randomly choosing" a positive integer does not makes sense).
Then, let $p_n$ be the desired answer for $n$ choices.  That is, $p_n$ is the probability that the sum of the first $n$ choices is $0\pmod 5$.  Of course, it follows that $1-p_n$ is the probability that the sum of the first $n$ choices is not divisible by $5$.
Clearly $p_1=0$.  To work recursively, we remark that, in order for the $n^{th}$ sum to be $0\pmod 5$, we need, first, that the $(n-1)^{st}$ sum is not $0\pmod 5$ and then we need to have chosen the unique $n^{th}$ number which makes the $n^{th}$ sum $0\pmod 5$.  Thus $$p_n=(1-p_{n-1})\times \frac 14$$
This can easily be computed by hand out to six terms.  It is not difficult to solve it explicitly, and we get $$p_n=\frac {4^{n-1}-(-1)^{n-1}}{5\times 4^{n-1}}$$
Note that this expression will not generally be in reduced form.  Indeed, $5$ divides the numerator.
Should add:  I feel sure that this is a duplicate of an older problem, but a quick search failed to find the duplicate.
