What are the last 20 digts of the number mega, which is "2 in a pentagon" in steinhaus-moser-notation ?
In contrary to power towers or tetration, the ending digits are not stable. I found out that the last digits of mega are 56.
What about "2 in a hexagon", what are the last 20 digits of this number ?
Let $T(n)$ denote number $256$ in $n$ triangles, so $T(0)=256$ and $T(n+1)=T(n)^{T(n)}$. The number mega is then equal to $T(256)$.
According to the Chinese Remainder Theorem, finding last $d\geq 1$ (decimal) digits of $T(n)$ amounts to finding $T(n)\bmod 2^d$ and $T(n)\bmod 5^d$ and a little bit of maths to combine the two.
First of all, we can make a simple observation: $$T(n) = T(0)^{T(0)T(1)\ldots T(n-1)}$$
This immediately allows us to conclude that $2^d$ divides mega for any reasonable value of $d$. When it comes to the exponent, Euler's generalization of Fermat's Little Theorem tells us that $4^{\varphi(5^d)}\equiv 1\pmod {5^d}$ and combining $\varphi(5^d)=4\times 5^{d-1}$ and $T(0)=4^4$ gives us $$T(0)^{5^{d-1}}\equiv 1\pmod {5^d}$$ Thus, the value of the exponent is only relevant modulo $5^{d-1}$.
These observations allow us to define a helper sequence $S(n)$ representing the product in the exponent: $$\begin{eqnarray} S(0) & = & 1 \\ S(n+1) & = & S(n)\cdot T(0)^{S(n)}\bmod 5^d \end{eqnarray}$$
and get $T(n)\equiv T(0)^{S(n)}\pmod{5^d}$. A simple implementation in PARI/GP might look like this:
The program says last 20 digits of mega should be $49731993539660742656$. It is capable of going considerably further, though, with $1000$ being computable in a few seconds on my machine. The computation time seems to grow roughly proportionally to $d^{2.5}$.
When it comes to $2$ in hexagon, that's a considerably more dangerous beast; I'll see if and how it can be tackled to get at least some information about its digits later.