Why is any number to the 1,5,9,13, etc. modulus 10 itself?

108 Views Asked by At

Why is $n^{4k+1} \% 10 = n$ for any integer $n$ and any whole number $k$? What about base 10 math makes this so?

1

There are 1 best solutions below

0
On

We find a pattern like this for any squarefree base (that is, if our base has no repeated prime factors). It is basically a consequence of the Chinese Remainder Theorem plus Fermat's Little Theorem. Suppose a base $b$ has a factorization $p_1p_2...p_r$. Then by the Chinese Remainder Theorem we have

$$\mathbb{Z}/b\mathbb{Z} = \mathbb{Z}/p_1\mathbb{Z} \oplus ... \oplus \mathbb{Z}/p_r\mathbb{Z}$$

(an integer's residue mod $b$ is determined uniquely by it's residues mod $p_1$ through $p_r$). In each of these factors we have the identity $n_i^{p_i-1}=n_i$ for any $n_i$.

The end result is that if we write $n = (n_1,...,n_r)$, then $n^m = n \mod b$ for all $n$ exactly when $m-1$ is a multiple of $\text{lcm}(p_1-1,...,p_r-1)$.

Example: $b = 10 = 2* 5$ then such $m$ are of the form $\text{lcm}(1,4) k + 1 = 4k+1$.

Example: $b = 35 = 5*7$ then we have $\text{lcm}(4,6)k+1 =12k + 1$.

Note that we cannot hope to find such patterns for bases with repeated prime factors. If $b$ has a repeated prime factor, and it's distinct prime factors are $p_1,...,p_r$, then $a=p_1p_2...p_r$ is non-zero mod $b$, but $a^k = 0$ mod $b$ for all $k$ greater than the largest power of any prime in $b$.