This seems to be similar to (I'd venture to say as hard as) a problem of Erdős open since 1979, that the base-3 representation of $2^n$ contains a 2 for all $n>8$.
Here is a paper by Lagarias that addresses the ternary problem, and for the most part I think would generalize to the question at hand (we're also looking for the intersection of iterates of $x\rightarrow 2x$ with a Cantor set). Unfortunately it does not resolve the problem.
But Conjecture 2' (from Furstenberg 1970) in the linked paper suggests a stronger result, that every $2^n$ for $n$ large enough will have a 1 in the decimal representation. Though it doesn't quantify "large enough" (so even if proved wouldn't promise that 2048 is the largest all-even decimal), it looks like it might be true for all $n>91$ (I checked up to $n=10^6$).
In contrast with other programming languages from its time, Pascal (the programming language)
also supports a set type, implemented as a bit pattern. The bit patterns associated with
the Pascal set type are $256$ bits wide, but this limitation is not essential and can been replaced
with other (larger) values eventually.
See Wikipedia for a reference.
A rather detailed description of the set type implementation can be found
as well .
So we have the following practice:
- a bit pattern in a computer is a set type
We also know that
- a bit pattern in a computer is a natural number type
Indeed, everybody knows that a natural number can be represented as a binary i.e. a bit pattern.
The word "type" has been employed here in order to avoid confusion with other
(i.e the standard mathematical) "set" and "number" definitions.
More precisely: the
hereditarily finite sets
are in one-to-one correspondence with the natural numbers. And the latter fact is independent of
computers.
Examples.
$$
\begin{array}{l}
0 = 000 = \{\} \\
1 = 001 = \{0\} = \{\{\}\} \\
2 = 010 = \{1\} = \{\{\{\}\}\} \\
3 = 011 = \{0\; 1\} = \{\{\}\{\{\}\}\} \\
4 = 100 = \{2\} = \{\{\{\{\}\}\}\} \\
5 = 101 = \{0\; 2\} = \{\{\}\{\{\{\}\}\}\} \\
6 = 110 = \{1\; 2\} = \{\{\{\}\}\{\{\{\}\}\}\} \\
7 = 111 = \{0\; 1\; 2\} = \{\{\}\{\{\}\}\{\{\{\}\}\}\} \\
\cdots
\end{array}
$$
The above is related to the following reference, by Alexander Abian and Samuel LaMacchia:
If the curly brackets $\{\}$ are replaced by square brackets $\left[\,\right]$ then another
important fact is observed:
- a set type is is a natural number type is a sorted natural numbers array type
If now we devise
an equivalent of the elementary number operations with sorted arrays,
then we have virtual unlimited precision at our disposal. That this approach indeed works, shall be demonstrated at hand of the OP's question.
Here is a link to the complete (Delphi Pascal) program that does the job:
And here is a link to the number $3^{100000}$ itself, which is too large to fit into
MSE's margins:
The screen output of the program is the number of digits, the first, the middle and the last digit:
47713
1 2 1
So, indeed, as
Lucian says in a comment: it's "obvious" that the digit in the middle is a $\large\, 2$ .
Note. A power like $\,3^{100000}\,$ sounds quite impressive, but with a smart
algorithm, the number of operations is only $\,\ln_2(100000)\approx17$ . For
real numbers $\,x\,$ and a natural $\,n\,$ it goes as follows:
function power(x : double; n : integer) : double;
var
m : integer;
p, y : double;
begin
m := n; y := x; p := 1;
while m > 0 do begin
if (m and 1) > 0 then p := p * y;
m := m shr 1; { m := m / 2 }
y := y * y;
end;
power := p;
end;
Wikipedia reference:
Efficient computation with integer exponents .
BONUS. In view of the above, the following answer is interesting:
Reference is made to a
paper by Kaye and Wong,
where on page 499 we read:
It was observed in 1937 by Ackermann [1] that $\mathbb{N}$ with the membership relation
defined by
$n \in m$ iff the $n$th digit in the binary representation of $m$ is $1$
satisfies ZF$-$inf. This interpretation, formalized in ZF with $\omega$ in place of $\mathbb{N}$
yields a bijection between $\omega$ and the collection $V_\omega$ of hereditarily finite sets.
Best Answer
The architect's answer, while explaining the absolutely crucial fact that $$\sqrt{308642}\approx 5000/9=555.555\ldots,$$ didn't quite make it clear why we get several runs of repeating decimals. I try to shed additional light to that using a different tool.
I want to emphasize the role of the binomial series. In particular the Taylor expansion $$ \sqrt{1+x}=1+\frac x2-\frac{x^2}8+\frac{x^3}{16}-\frac{5x^4}{128}+\frac{7x^5}{256}-\frac{21x^6}{1024}+\cdots $$ If we plug in $x=2/(5000)^2=8\cdot10^{-8}$, we get $$ M:=\sqrt{1+8\cdot10^{-8}}=1+4\cdot10^{-8}-8\cdot10^{-16}+32\cdot10^{-24}-160\cdot10^{-32}+\cdots. $$ Therefore $$ \begin{aligned} \sqrt{308462}&=\frac{5000}9M=\frac{5000}9+\frac{20000}9\cdot10^{-8}-\frac{40000}9\cdot10^{-16}+\frac{160000}9\cdot10^{-24}+\cdots\\ &=\frac{5}9\cdot10^3+\frac29\cdot10^{-4}-\frac49\cdot10^{-12}+\frac{16}9\cdot10^{-20}+\cdots. \end{aligned} $$ This explains both the runs, their starting points, as well as the origin and location of those extra digits not part of any run. For example, the run of $5+2=7$s begins when the first two terms of the above series are "active". When the third term joins in, we need to subtract a $4$ and a run of $3$s ensues et cetera.