# Call a number “holy” if it contains no 666666 in its decimal expansion. Are there infinitely many holy powers of 22?

We call a number “holy” if it contains no $$666666$$ in its decimal expansion, and “unholy” otherwise. For instance, $$1236662112366621$$ and $$666609666609$$ are unholy, while $$77777777$$ and $$6616626636666166266366$$ are holy.

Question: Is the set $${2n | n∈N,2n is holy}\{2^n \ | \ n \in \mathbb N, 2^n \text{ is holy}\}$$ infinite?

Of course, tons of similar questions can be asked by changing the number $$666666$$, the base $$22$$, and the base for extension (we asked for decimal, so the default was $$1010$$). I do not feel that I am the first one asking this, and I appreciate it if someone gives me references if applicable.

But my thought is the following:

Conjecture: No.

I will share my reasoning at the end of the post, but let us first see some facts:

Smallest unholy instances:
2157=1826877046663628647754606040895353774569915678722192=6277101735386680763835789423207666416102355444464034512896 \begin{aligned} 2^{157} &= 182687704\color{magenta}{666}362864775460604089535377456991567872\\ 2^{192} &= 6277101735386680763835789423207\color{magenta}{666}416102355444464034512896 \end{aligned}

Then, we witnessed a cluster of unholy powers: $$2218,2220,2222,2224,22262^{218}, 2^{220}, 2^{222}, 2^{224}, 2^{226}$$, and then kept holy for a while, until we hit the unholy $$22432^{243}$$.

Largest holy instances: I did not throw in a lot of CPU time to pursue holy numbers, nor did I try hard enough to optimize my programs, but among the $$37153715$$ holy powers of $$22$$, the largest of them are
$$225357,225896,226051,226667,229784.2^{25357}, 2^{25896}, 2^{26051}, 2^{26667}, 2^{29784}.$$

I tested up to around $$21100002^{110000}$$, but that is all I got. It probably will be reasonable for an average computer to test up to say $$21062^{10^6}$$ or $$21072^{10^7}$$, but I will be surprised to see a new holy number.

Statistics: For an integer $$nn$$, let $$H(n)H(n)$$ be the number of holy powers of $$22$$ up to $$2n2^n$$.

n      | H(n)     || n      | H(n)     || n      | H(n)
1000  |  875     || 11000  | 3567     || 21000  | 3700
2000  | 1560     || 12000  | 3602     || 22000  | 3703
3000  | 2059     || 13000  | 3621     || 23000  | 3705
4000  | 2442     || 14000  | 3645     || 24000  | 3707
5000  | 2747     || 15000  | 3655     || 25000  | 3709
6000  | 2984     || 16000  | 3670     || 26000  | 3712
7000  | 3171     || 17000  | 3682     || 27000  | 3714
8000  | 3332     || 18000  | 3689     || 28000  | 3714
9000  | 3440     || 19000  | 3693     || 29000  | 3714
10000  | 3514     || 20000  | 3695     || 30000  | 3715


A plot of this:

The heuristics of the conjecture:

This is definitely not close to a proof at all, and I still hope if rigorous arguments exists:

The idea is that we want to estimate, for an integer $$nn$$, the probability $$P(n)P(n)$$ that $$2n2^n$$ is holy, and then compute $$∑∞n=1P(n)\sum_{n=1}^\infty P(n)$$.

We know that $$2n2^n$$ has $$O(nln2)O(n\ln 2)$$ decimal digits, so there are $$O(nln2)O(n\ln 2)$$ groups of three. For each group there is a $$1−10−31-10^{-3}$$ chance to be not $$666666$$, so very roughly
$$P(n)=(1−10−3)nln2≈e−10−3 nln2. P(n) = (1-10^{-3})^{n\ln 2} \approx e^{-10^{-3}\ n\ln 2}.$$

And note that
$$∞∑n=1P(n)≈∫∞n=0e−10−3 xln2dx<∞. \sum_{n=1}^\infty P(n) \approx \int_{n=0}^\infty e^{-10^{-3}\ x\ln 2} dx < \infty.$$

The red "estimation line" in the figure above follows from this integral.

Of course, one can easily argue the properness of the heuristic above:

• The distribution of the digits close to the left are not uniform; they are affected by the growth of logarithmic functions.
• The distribution of the digits close to the right are not uniform; they are affected by the pattern of $$2^n \pmod{10^k}2^n \pmod{10^k}$$.
• $$P(n)P(n)$$ and $$P(n+i)P(n+i)$$ are not independent, partially because of the awful choice of the number $$666666$$: $$6\cdots 6 \times 2^2 = 26\cdots 646\cdots 6 \times 2^2 = 26\cdots 64$$.

Any thoughts are appreciated.

Your conjecture is indeed a known open problem, and in fact we expect that there is some $$N>0N>0$$ such that $$666666$$ occurs among the digits of the decimal expansion of $$2^n2^n$$, for every $$n>Nn>N$$ ! Of course, one can replace $$k=666k=666$$ by any positive integer $$kk$$ (more accurately, any sequence of digits).

this blog post (for the case $$k=0k=0$$),
Problem 24 in Unsolved Problems in Number Theory by Richard Guy,
here,
or those OEIS sequences : A035064,
A030706,
A007377,
A035062.
These are closely related questions :
(1),
(2),
(3).

Here is a relevant open problem by Fürstenberg, which apparently gives an approach to the above conjecture (even though I'm not sure to understand why), according to the page 189 of Ten Lectures on the Interface between Analytic Number Theory and Harmonic Analysis (reference given in John Cook's post linked above).
See also problems 10.25 and 10.27 in Yann Bugeaud's Distribution Modulo One and Diophantine Approximation.
According to this paper, Fürstenberg's conjecture is just "far out of reach" !
Similarly, in §6.6, p. 138 of Bugeaud's book, it is mentioned that "Erdős asked how often the ternary expansion of $$2^n2^n$$ omits the digit $$22$$. It is likely that there are only finitely many such integers $$nn$$ but the problem is still beyond reach"$$^{[1]}^{[1]}$$ !

For the sake of completeness, here is an excerpt of Fürstenberg's paper explaining the relation between the two problems (Conjectures 2 and 2' in his paper). Reference: Intersections of Cantor sets and transversality of semigroups in "Problems in Analysis. A Symposium in Honor of Salomon Bochner".

To sum up, we expect any given sequence of digits to occur in the decimal expansion of all but finitely many powers of $$22$$, but this is currently an unsolved problem which is out of reach!

$$^{[1]}^{[1]}$$ One of the best result known so far is given as exercise 6.4 in Bugeaud's book. Namely, if $$N(X)N(X)$$ denotes the number of positive integers $$m \leq Xm \leq X$$ such that $$2^m2^m$$ has no "$$22$$" in its ternary expansion, then
$$N(X) \leq 1.62 X^{\log(2) / \log (3)}N(X) \leq 1.62 X^{\log(2) / \log (3)}$$. The (intractable) conjecture is that $$N(X)N(X)$$ is bounded.