Show that there are infinitely many powers of two starting with the digit 7 [duplicate]

This is a contest math problem which I was not able to solve. A hint toward the solution would be helpful as well.

Problem: Show that there are infinitely many powers of 2 starting with the digit 7.

Thanks in advance.


I was intrigued. Not being smart enough to get a theoretic proof I used brute force. Definitely ugly. Only redeeming aspect is it is constructive.

Here is how I proceeded.

Remark: If two numbers are powers of 2 then so is their product.

IDEA: I will get one power of 2 starting with 7; then I'll use the above remark to multiply by a suitable power of 2 that will again start with 7. As this is an infinite process this should do.

$a=2^{46}=70368744177664$ (at least one exists!)

$b=2^{10}=1024$

$c=2^{53}=9007199254740992$

Let us take these three numbers. Let $x$ be a good number (that is a number that is a power of 2 which starts with 7). Then either $bx$ or $cx$ is good.

If the second digit of $x$ is less than 8 you can multiply by $b$ (i.e.1024), other wise multiply by c. QED


I think this was a V.I Arnold problem (correct me if I am wrong). I think have seen this solution to your problem before:

The statement $2^k$ starts with a $7$ is equivalent to the existence of an integer $m$ such that $ \frac{2^k}{10^m} \in [7, 8)$. Now we just need to show that the set of all numbers of the above form is dense in the set of real numbers. Showing that $\{ \frac{2^n}{5^m} : m,n \in \mathbb{Z}\}$ is dense is good enough (cancelled powers of two). Apply the function $\log_2$ to the fraction. This function is continuous, so it is enough to prove that $\{ n-m\log_2{5} :m,n \in \mathbb{Z} \}$ is dense. This is an additive group, which is not cyclic since $\log_2 {5}$ is irrational (and $\implies$ $1$ and $\log_2 {5}$ cannot both be integer multiples of the same number). It follows that this group is dense in the real numbers. Hence the statement is true.

We also have the existence of such a number in any non-empty open interval in $\mathbb{R}$, which implies that there are infinite powers of two starting with any string of integers.


A general idea for how to approach this problem would be to take logs. If $7 \cdot 10^k < 2^n < 8 \cdot 10^k$, then we have $$k + \log_{10} 7 < n \log_{10} 2 < k + \log_{10} 8.$$ Since $k$ is just an arbitrary integer, we can rephrase this as $$\log_{10} 7 < \{n \log_{10} 2\} < \log_{10} 8,$$ where $\{x\} = x - \lfloor x \rfloor$ denotes the fractional part of $x$.

After this, there are many approaches to solving the problem. For example, if we focus on powers of the form $2^{10n} = 1024^n$, the fractional part is $\{n \log_{10} 1024\} = \{n \log_{10} 1.024\}$. As you increase $n$, $ \{n \log_{10} 1.024\}$ will increase by $\log_{10} 1.024 \approx 0.01$, until this would make it bigger than $1$ and it wraps around (this happens every $97$ or $98$ steps).

But the interval $[\log_{10} 7, \log_{10} 8]$ has width about $0.058$, so going in steps of $0.01$ we will never miss it. Therefore in every cycle of about $97$ steps, we'll see this interval at least once, which means we'll have at least one power of $2$ with a first digit of $7$.


Repeatedly multiplying by $2^{10} = 1024$ lets the first digit of any number $n$ increase monotonously (well, if you accept digit $0$ as the successor of digit $9$), but not strictly; in fact each digit is visited several times before the next is reached. For the largest number not starting with a digit $7$ (i. e. $699999999...$) we get $716799999...$ in one step and $734003199...$ in the next, so we never can "skip" the $7$ as first digit when repeatedly multiplying by $1024$.

If this works for any $n$ it works for any power of two. Products of several powers of two are powers of two as well, so the generated number is a power of two larger than $n$, hence, by induction, we can generate an infinite number of powers of two all starting with the digit $7$. $\Box$

Generation Rule for Numbers Starting With Digit 7

For any given number $n$ ($n \in \mathbb{N}$, $n>9$) you have to multiply it by $2 ^ {10 \cdot p}$ to get a number starting with the digit $7$, with

$$p = \left \lfloor \log_{1.024} {750 \over n'} \right \rfloor$$ and $n'$ being the first two digits of $n$ (which exist because of $n>9$).

Example:

$$n = 3956$$ $$\Rightarrow n' = 39$$ $$\Rightarrow p = \left \lfloor \log_{1.024} {750 \over 39} \right \rfloor = 124$$ $$3956 \cdot 2 ^ {10 \cdot 124} = {748946690\dots} \mbox{ (377 digits)}$$