Probability of number formed from dice rolls being multiple of 8 
A fair 6-sided die is tossed 8 times. The sequence of 8 results is recorded to form an 8-digit number. For example if the tosses give {3, 5, 4, 2, 1, 1, 6, 5}, the resultant number is $35421165$. What is the probability that the number formed is a multiple of 8.

I solved this by listing all possibilities for the last 3 digits that give multiples of 8, and found this to be $\frac{1}{8}$. 
The solution key agrees with my answer, but also says that "There are quicker ways to solve the problem using a more advanced knowledge of number theory"

What would be a faster way to solve this using number theory?
 A: Here's a generalization:
The sample space for a six-sided die is $S = \{1,2,3,4,5,6\}$.
Theorem: There are exactly $\color{blue}{3}^n$ n-tuples $(x_{n-1}, x_{n-2}, \cdots, x_1, x_0)$  that satisfy $f(n) = 10^{n-1}x_{n-1} + 10^{n-2}x_{n-2} + \cdots + 10x_1 + x_0 \equiv 0 \mod{2^n}$ for $x_i \in S$
Proof by induction:
Base case $n=1$: We have $f(1) = x_0 \equiv 0 \mod{2}$ which is clearly satisfied by exactly $\color{blue}{3}$ 1-tuples $(2), (4)$ and $(6)$.
Inductive step: Assume true for $n$. Now for $n+1$ we have $\begin{array}{l}f(n+1) &= 10^nx_n &+ & 10^{n-1}x_{n-1}  + \cdots + 10x_1 + x_0 \equiv 0 \mod{2^{n+1}} &\text{(i)}\\&\Rightarrow 0 &+ & 10^{n-1}x_{n-1} + \cdots + 10x_1 + x_0 \equiv 0 \mod{2^{n}}\\&\Rightarrow  & & 10^{n-1}x_{n-1} + \cdots + 10x_1 + x_0 \equiv 0  \mod{2^{n}}& \text{(ii)}\end{array}$
But $\text{(ii)}$ has exactly $\color{blue}{3}^n$ n-tuple solutions from our inductive hypothesis. 
For each such n-tuple $(x_{n-1}, x_{n-2}, \cdots, x_1, x_0)$ , there are $\color{blue}{3}$ unique $x_n \in S$ that satisfy $\text{(i)}$ per Lemma below. So, the number of (n+1)-tuple solutions $(x_n, x_{n-1}, \cdots, x_1, x_0)$ is $\color{blue}{3} \cdot \color{blue}{3}^n = \color{blue}{3}^{n+1}$ and this completes the proof by induction.
Answer:
The probability of forming an n-digit number $x_{n-1}x_{n-2}\cdots x_1x_0 = f(n)$ divisible by $2^n$ is thus $\frac{\text{count of n-digit numbers } \equiv 0 \mod{2^n}}{\text{total count of n-digit numbers}} = \frac{3^n}{6^n} = \frac{1}{2^n}$. In your case, $n=3$, giving the probability of $\frac{1}{8}$.

Lemma: $10^n x + m \equiv 0 \mod{2^{n+1}} $ has exactly $\color{blue}{3}$ unique solutions $x\in S$ given that $m \equiv 0 \mod{2^n}$.
Proof: We have $m \equiv 0 \mod{2^n} \implies m = 2^n\ell$ where $\ell \in \mathbb{Z}$.
$\begin{array}{cl} \therefore &10^n x + m &\equiv 0\mod{2^{n+1}}&\\ \iff & 10^n x + 2^n\ell &= 2^{n+1} q & (q \in \mathbb{Z})\\ \iff & 5^nx + \ell &= 2q &(\text{divide by }  2^n)\\\iff & x + \ell &\equiv 0 \mod{2}  & (5^n \equiv 1 \mod{2})\end{array}$
And this has exactly $\color{blue}{3}$ unique solutions $x\in S$ since,
$\mod{2}:\begin{cases}\ell \equiv 0  \implies x + 0 \equiv 0 \implies x \equiv 0 &\implies x \in \{2, 4, 6\} \\ \ell \equiv 1  \implies x + 1 \equiv 0 \implies x \equiv 1 &\implies x \in \{1, 3, 5\}\end{cases}$
A: We only care about the last three digits obviously, so the possible sums of just those three die are $100a + 10b + c$, where $a$, $b$, and $c$ are all between $1$ and $6$, inclusive.
We check the divisibility by taking this modulo $8$. If the result is equivalent to $0$, then it is divisible.
Setting up the equivalence condition:
$$
100a+10b+c \equiv 0 \pmod{8} \\
4a + 2b + c \equiv 0 \pmod{8} \\
2(2a+b) + c \equiv 0 \pmod{8} \\
2(2a+b) \equiv -c \pmod{8} \\
2a + b \equiv -\frac{c}{2} \pmod{4}
$$
The range of $2a+b$ is between $3$ and $18$, inclusive. Each of the values can be obtained in three different ways, except $\{3,4,17,18\}$ each can only be obtained one way, and $\{5,6,15,16\}$ each can be done two ways (there are $8$ integers that can be obtained $3$ ways).
Three cases: $-\frac{c}{2}$ must be $3$, $2$, or $1$ modulo $8$. Because the consecutive $8$ integers in the middle can be done $3$ ways, each case has exactly $2$ numbers that satisfy the equivalence, giving us $3\cdot{3}\cdot{2} = 18$ cases. Taking the other integers modulo $4$, only $1$ number from each of the other sets is not congruent to any of $\{3,2,1\}$, giving us $3\times{3} = 9$ more cases, totalling $18+9 = 27$.
Final probability: $\frac{27}{6^3} = \frac{1}{8}$.
A: Let's use Zhuli's notation.
$c$ has a probability of $\frac{1}{2}$ to be even.
Now if $\frac{c}{2}$ is even (i.e., $4|c$), then $4|2b+c \iff b$ is even. If $\frac{c}{2}$ is odd, then $4|2b+c \iff b$ is odd. Both conditional probabilities are $\frac{1}{2}$ therefore the marginal probability $4|2b+c$ is $\frac{1}{4}$.
Next we apply the same reasoning on $2a + (b+\frac{c}{2})$ we get the marginal probability that $4 | 2a + (b+\frac{c}{2})$, or equivalently, $8 | 4a + 2b +c$, is $\frac{1}{8}$. Q.E.D.
============================
Alternatively we could avoid conditional probabilities and just use independence and marginal probabilities.
First note that $\Pr(2|a)=\Pr(2|b)=\Pr(2|c)=\frac 12$ and $a,b,c$ are independent.
Next,
$$
\Pr(4|2b+c)=\Pr(2|c,4|c,2|b) + \Pr(2|c, 4\nmid c, 2\nmid b)
$$
$$
=\Pr(2|c, 4|c) \Pr(2|b)+\Pr(2|c, 4\nmid c)\Pr(2\nmid b) \tag{independence}\\
= \frac 12 \left( \Pr(2|c, 4|c) + \Pr (2|c, 4\nmid c)\right) = \frac 12 \Pr(2|c)=\frac 14.
$$
Finally,
$$
\Pr(8|4a+2b+c)=\Pr(4|2b+c,8|2b+c,2|a) + \Pr(4|2b+c, 8\nmid 2b+c, 2\nmid a)\\
=\Pr(4|2b+c,8|2b+c)\Pr(2|a) + \Pr(4|2b+c, 8\nmid 2b+c)\Pr(2\nmid a)\\
=\frac 12 \left(\Pr(4|2b+c,8|2b+c) + \Pr(4|2b+c, 8\nmid 2b+c)\right)\\
=\frac 12 \Pr(4|2b+c)=\frac 12 \cdot \frac 14 = \frac 18.\blacksquare
$$
Remark: We can prove, via induction, the generalization proposed by Anant using the technique above.
A: Here's another approach. As noted in the problem statement, it all comes down to the last $3$ rolls concatenating to a multiple of $8$.
The last two rolls have to concatenate to a multiple of $4$.
We break these into two groups: The last two are a multiple of $8$, or not:
Group 1: $16, 24, 32, 56, 64$.
Group 2: $12, 36, 44, 52$.
To complete an entry in group 1 to a multiple of $8$, the leftmost digit must be even ($3$ choices). To complete an entry in group 2 to a multiple of $8$, the leftmost digit must be odd ($3$ choices).
So altogether there will be $3\cdot 5 + 3\cdot 4 = 27$ multiples of $8$.
This gives a probability of $\frac{27}{216}=\frac18$.
