FInd the missing digit in $2^{29}$ given all nine digits differ The number $2^{29}$ has (in base $10$) $9$ digits, all different. Which digit is missing?
I think about using fermats theorem dosen't know how to begin
 A: $2^{29}\equiv2^{-1}\equiv\frac{1}{2}\equiv\frac{10}{2}\equiv5\equiv \text{s} \pmod 9$ where $\text{s}$ denotes the sum of its digits.
The sum of the ten digits is $\text{S}=0+1+2+3+4+5+6+7+8+9=\frac{1}{2}\times10\times9=45\equiv0 \pmod 9$
Therefore, if $2^{29}$ contains $9$ of these and the remaing one is $n$, $2^{29}\equiv S-n\equiv-n \pmod{9}$
so $s\equiv-n\equiv5 \pmod{9}$ and the missing digit is $n=4$.
A: I'll take this opportunity to do some exponentiation by squaring... work down the left-hand column, subtracting $1$ from odd numbers and halving even numbers. then go up the right-hand column. multiplying by the base, $2$, or squaring as appropriate.
$$
\begin{array}{c|r}
x & 2^x\\\hline
29 & 536870912 \\
28 & 268435456 \\
14 & 16384 \\
7 & 128 \\
6 & 64 \\
3 & 8 \\
2 & 4 \\
1 & 2 \\
\end{array}
$$
Of course I didn't really need to go right down to the bottom, but for the sake of completeness...
Anyhow the missing digit by this labour-intensive method (yes, I did it literally on the back of an envelope while sitting at a computer) is indeed $4$.
