Hey! In this note I'm going to talk about a very cool pattern... in the case of 3, observe the sequence below:

\[\displaystyle { P }_{ 0 }=3\\ { P }_{ 1 }={ 3 }^{ { P }_{ 0 } }=27\\ { P }_{ 2 }={ 3 }^{ { P }_{ 1 } }=...84987\\ { P }_{ 3 }={ 3 }^{ { P }_{ 2 } }=...39387\\ { P }_{ 4 }={ 3 }^{ { P }_{ 3 } }=...55387\\ { P }_{ 5 }={ 3 }^{ { P }_{ 4 } }=...95387\\ { P }_{ 6 }={ 3 }^{ { P }_{ 5 } }=...95387\]

Notice that the digits at the end stay the same! In fact, we add one "fixed" digit every time. The cool part is that this works for every natural number coprime to 1000 - which also implies it works for any prime greater than 5, and that this works 40% of the time! (\(\phi(1000)=400\)) In this note I'm only covering the special case where \({P}_{k}\) has \(k\) fixed digits -- there are other cases, such as when you use 5, that grow far more quickly.

The first step is to show that if \(a\) is coprime to 1000 then

\[\displaystyle {a}^{100} \equiv 1 \pmod {1000}\]

This is justified because \(\lambda(1000)=100\), where \(\lambda(n)\) is the Carmichael function which gives the minimum value (for where 100 is) for the equation above. Now, let \({a}^{100}=1000b+1\). Let's compute \({a}^{1000}\):

\[\displaystyle {\left(1000b+1\right)}^{10} = \binom{ 10 }{ 10 }+\binom{ 10 }{ 9 }1000b...\]

We now have that \({a}^{1000} \equiv 1 \pmod {10000}\), and we can induct to show that \({a}^{{10}^{n}} \equiv 1 \pmod {{10}^{n+1}}\).

In this section I'll use \(j\) as a number coprime to 1000. Let \({D}_{n}\) be the \({n}^{th}\) digit of \({P}_{k}\), and let \(d\) be the number of digits in \({P}_{k}\). Observe that

\[\displaystyle { P }_{ k+1 }=\prod _{ i=1 }^{ d }{ { j }^{ { 10 }^{ d-i }{ D }_{ d-i } } } \]

Using our previous result, if we evaluate mod \({10}^{k+1}\), a lot of terms will just become 1 and can be ignored. So we get a new product:

\[\displaystyle { P }_{ k+1 }=\prod _{ i=1 }^{ k }{ { j }^{ { 10 }^{ k-i }{ D }_{ k-i } } } \pmod {{ 10 }^{ k+1 }}\]

Okay, so really we only care about the last \(k\) digits of \({P}_{k}\) if we're finding the last \(k+1\) digits of \({P}_{k+1}\). (Specifically we raise j to \({P}_{k}\) in mod \({10}^{k}\))

Now I can prove the conjecture about the last digits (by induction). The base case is easy, so I'll leap right into showing that the next \({P}_{k+1}\) has \(k+1\) fixed digits.

First, we assume that the last \(k\) digits of \({P}_{k}\) are fixed. This means we only need to show that we add another fixed digit in \({P}_{k+1}\). For this part, let \(a \equiv {P}_{k} \pmod {{10}^{k}}\) and let \(b\) be the \(k+{1}^{th}\) digit from the end of \({P}_{k+1}\). We want to show that:

\[\displaystyle { j }^{ { 10 }^{ k }b+a }\equiv { 10 }^{ k }b+a \pmod {{10}^{k+1}}\]

which essentially says that the last \(k+1\) digits of \({P}_{k}\) will be the last \(k+1\) digits of all later terms in the series. The two finds I made earlier make this very easy:

\[\displaystyle { \left( { j }^{ { 10 }^{ k } } \right) }^{ b }{ j }^{ a }\equiv { 10 }^{ k }b+a{ \pmod { 10 }^{ k+1 } }\]

which we may reduce to

\[\displaystyle { j }^{ a }\equiv { 10 }^{ k }b+a{ \pmod { 10 }^{ k+1 } }\]

We know from earlier that \({j}^{a}\) will give \({P}_{k+1} \pmod {{10}^{k+1}}\), and by definition \({P}_{k+1} \equiv {10}^{k}b+a \pmod {{10}^{k+1}}\). Thus the statement we started with is true, and we're done!

Please comment if you have any questions/concerns or any further ideas!

## Comments

Sort by:

TopNewestYes, this makes good sense! Beautiful!

That's how I think of it: For the Carmichael Lambda we have \(\lambda(10^m)|10^{m-1}\) for \(m\geq{3}\) . Also, \(\lambda(100)=20,\lambda(20)=4\) and \(\lambda(4)=2\).

Thus, for an odd integer \(a\), we can "work our way up" as follows: \(a\equiv1\pmod2\) , so \(a^a\equiv a \pmod4\) so \(a^{a^a}\equiv{a^a}\pmod{20}\) so \(a^{a^{a^a}}\equiv{a^{a^a}}\pmod{100}\) and \(^{m+1}a\equiv{^m{a}}\pmod{10^{m-1}}\) for all positive integers \(m\). – Otto Bretscher · 2 years ago

Log in to reply

– Dylan Pentland · 2 years ago

Cool! Do you have any ideas on how the resulting series of fixed digits could be found? I'm trying to find some patterns in them but haven't found anything yet...Log in to reply

– Otto Bretscher · 2 years ago

I'm sure you will figure it out ;) Enjoy!Log in to reply

This looks interesting! Thank you for sharing!

It is not hard to see that, for any two positive integers \(b\) and \(n\), the "power tower" \(^m{b}=b^{b^{b^{...}}}\) eventually becomes stationary modulo \(n\). We can prove this by induction on \(n\); let's assume the claim to be true for integers \(<n\) . Then the exponent \(^{m-1}b\) of our power tower will eventually become stationary modulo \(\phi(n)\) , so that the whole tower will become stationary modulo \(n\) by Euler's Theorem.

In your article, you quantify the "eventually" part of this statement in some cases... I look forward to studying the details when I have some free time. – Otto Bretscher · 2 years ago

Log in to reply

yo – Mona Sax · 1 year, 10 months ago

Log in to reply

I used your note as an inspiration fore one of my Problems. Thanks! Basically, it's about your \(P_2\) and \(P_3\) in the even case.... when do they end with the same digit? You have probably thought about this already... – Otto Bretscher · 2 years ago

Log in to reply

I think there is a typo you said let a^100=1000b+1 and then took a^1000=(1000b+1)^1000. – Shivamani Patil · 2 years ago

Log in to reply

– Dylan Pentland · 2 years ago

Yeah, I meant to raise it to the 10th. But, the proof still works :)Log in to reply

– Shivamani Patil · 2 years ago

Ya worked.BTW great work.Keep it up. xDLog in to reply