# Find last n for which 2^n has a 0.

Find last number $n$ for which $2^n$ has a zero. For example $2^{10}=1024$ has a zero for which last number zero will be there. (It is possible that there doesn't exist such limits to $n$ but what is the proof?)

• Is this homework? What have you tried? – user98602 Apr 20 '14 at 6:58
• How are you defining last $n$? Additionally, how do you handle fractional cases as $2^{-12}=0.00024414062$ that has a 0 and is a rather small number compared to others. – JB King Apr 20 '14 at 8:12

By Euler's theorem, $2^{20k}\equiv1\pmod{25}\implies 2^{20k+2}\equiv04\pmod{100}$, so..

• (L=Little, contrary to L=Last.) – Asaf Karagila Apr 20 '14 at 7:40
• This is such a far better approach than my own it's not even funny. – user98602 Apr 20 '14 at 7:43
• That's brilliant!What was your motivation behind this solution?Did you first think about showing that there are infinitely many powers of two with zero as the second-to-last digit?Also,can we not comment using Euler's totient theorem that $2^{40k}\equiv 1\pmod {100}$ and the result follows? – rah4927 Apr 20 '14 at 7:59
• Hehe, you're welcome! – Asaf Karagila Apr 20 '14 at 8:05
• @rah4927 Just as a note: the result you'd hoped for there is very silly, since the left-hand side is a power of two, and the right-hand side says that our number is odd! – user98602 Apr 20 '14 at 8:12

Hint: Prove that infinitely many $2^n$ will start with $10$.

• How to prove this? I am confused. – Satvik Mashkaria Apr 20 '14 at 7:02
• Since $\log_{10}2$ is irrational, the set $\{\{n\log_{10}2\}:n\in\mathbb Z^+\}$ is dense in $[0,1]$. (You can prove this with the Pigeon Hole Principle for any irrational number.) Knowing this, try to show that $2^n$ can start with $10$ when written in decimal. – punctured dusk Apr 20 '14 at 7:22
• @barto: Using $\{x\}$ to denote the fractional part while using $\{\ldots\}$ to denote a set is an effective example of when operator overloading is bad. Perhaps writing $x-\lfloor x\rfloor$ is better for readability. – Asaf Karagila Apr 20 '14 at 7:42
• @barto: I agree, and I understand your plight. But that's life... :\ – Asaf Karagila Apr 20 '14 at 8:10
• @barto I've occasionally seen $\mod 1$ used as shorthand for the fractional part. – user98602 Apr 20 '14 at 8:12