Easy proof that $n=5$ is the only solution of $n^n \equiv n^{n^n} \pmod {10^{n-1}}$ if $n \in \mathbb{N}-\{0,1\}$ is not a multiple of $10$

92 Views Asked by At

Let $n > 1$ be an integer not a multiple of $10$. Is there a short proof that $n = 5$ is the only solution to $n^n \equiv n^{n^n} \pmod {10^{n-1}}$, given the fact that $5^{5^5} \equiv 3125 \pmod{10^4}$ (and even $3125 \equiv 5^{5^5} \pmod{10^5}$)?

P.S. This question is related to my research on the congruence speed of tetration and arose in the discussion of the OEIS sequence $A369826$ before it was finally approved. Moreover, I am planning to submit another sequence concerning the number of frozen rightmost digits of some tetration bases at a given height (as my pending sequences are processed), and I would like to add also a short explanation in the comments that does not invoke the congruence speed of $n$ (i.e., for any integer $n>5$ that is not a multiple of $10$, the number of frozen digits at height $2$ cannot exceed three times the constant congruence speed of the base, which is given by Equation (16) of Number of stable digits of any integer tetration, and then the stated result trivially follows).

1

There are 1 best solutions below

0
On BEST ANSWER

A relatively short proof that the only non-multiple of $10$ with $n \gt 1$ which is a solution to

$$n^n(n^{n^n-n} - 1) \equiv 0 \pmod{10^{n-1}} \tag{1}\label{eq1A}$$

is $5$ involves handling several cases, while also using the Lifting-the-exponent lemma (LTE lemma).

Case #$1$: $2 \nmid n$, $5 \mid n$ and $n \ge 15$

Since $5^{n-1} \mid n^n$, we just need to check if

$$n^{n^n-n} - 1 \equiv 0 \pmod{2^{n-1}} \tag{2}\label{eq2A}$$

Since $2 \mid n - 1$ and $n^n - n$ is even, the LTE lemma gives

$$\nu_2(n^{n^n-n} - 1) = \nu_2(n-1) + \nu_2(n+1) + \nu_2(n^n - n) - 1 \tag{3}\label{eq3A}$$

Using the LTE lemma with $n^n - n = n(n^{n-1} - 1)$ results in

$$\nu_2(n^n - n) = \nu_2(n-1) + \nu_2(n+1) + \nu_2(n-1) - 1 \tag{4}\label{eq4A}$$

Substituting this into \eqref{eq3A}, and using that $\nu_2(n-1)$ or $\nu_2(n+1)$ is $1$, shows that

$$\nu_2(n^{n^n-n} - 1) = 3\nu_2(n-1) + 2\nu_2(n+1) - 2 \lt 3\lceil\log_2(n-1)\rceil \lt n - 1 \tag{5}\label{eq5A}$$

This means \eqref{eq2A} and, thus also \eqref{eq1A}, don't hold.

Case #$2$: $2 \mid n$ and $5 \nmid n$

Since $2^{n-1} \mid n^n$, the only check required here is if

$$n^{n^n-n} - 1 \equiv 0 \pmod{5^{n-1}} \tag{6}\label{eq6A}$$

There are several cases depending on $n \mod 5$. First, if $n \equiv 1 \pmod{5}$, then the LTE lemma shows that

$$\nu_5(n^{n^n-n} - 1) = \nu_5(n-1) + \nu_5(n^n - n) \tag{7}\label{eq7A}$$

Using the LTE lemma again with $n^n - n = n(n^{n-1} - 1)$ gives

$$\nu_5(n^n - n) = \nu_5(n-1) + \nu_5(n-1) \tag{8}\label{eq8A}$$

This in \eqref{eq7A}, and using that $n \ge 6$, we get

$$\nu_5(n^{n^n-n} - 1) = 3\nu_5(n-1) \lt n - 1 \tag{9}\label{eq9A}$$

This shows that \eqref{eq6A} and, thus also \eqref{eq1A}, don't hold.

Similar arguments can be used with the other congruencies, although starting from a base of $n^2 - 1$ with $n \equiv 4 \pmod{5}$ and, if applicable (i.e., we require that $4 \mid n$), a base of $n^4 - 1$ with $n \equiv 2,3 \pmod{5}$.

Case #$3$: $2 \nmid n$ and $5 \nmid n$

We need both \eqref{eq2A} and \eqref{eq6A} to hold, with the same basic arguments as in case #$1$ and #$2$ being used to show there are no solutions for this case either.