2
$\begingroup$

In the decimal system the last digit of a whole number is the same as the last digit of its fifth power. For example, $$\underline{2}^5=3\underline{2},$$ $$\underline{3}^5=24\underline{3}$$ and $$\underline{4}^5=102\underline{4}.$$ Is a similar statement true for some powers for other base systems? Does it follow from Fermat's little theorem?

$\endgroup$
  • $\begingroup$ With the chinese remainder theorem, it boils down to Fermat's little theorem. $\endgroup$ – Peter Jun 10 '18 at 7:27
  • $\begingroup$ The statement is not true in general in other bases: for example in base 7 we have lastdigit(2) = 2, lastdigti(2^5) = 4. $\endgroup$ – Dr. Wolfgang Hintze Jun 10 '18 at 7:37
  • $\begingroup$ @Dr.WolfgangHintze But last digit of 2^7=128 is 2 in base 7. $\endgroup$ – DVD Jun 10 '18 at 7:41
  • $\begingroup$ @ DVD But as far as I understand the power you requested in the OP was always 5, not 7 $\endgroup$ – Dr. Wolfgang Hintze Jun 10 '18 at 7:54
  • $\begingroup$ @Dr.WolfgangHintze In other bases, we need another exponent, but there is always an exponent doing the job, if the base is squarefree. $\endgroup$ – Peter Jun 10 '18 at 7:56
2
$\begingroup$

Whenever $p>1$ is a squarefree integer, we have $$a^{\lambda(p)+1}\equiv a\mod p$$ for all non-negative integers $a$, hence for every squarefree base $p$, there are examples. $\lambda(n)$ denotes the Carmichael-function.

$\endgroup$
  • $\begingroup$ Thank you. What happens if $p$ is not square-free? $\endgroup$ – DVD Jun 10 '18 at 7:27
  • 3
    $\begingroup$ It won't work in base $9$ since $3^n\equiv 0 \pmod 9$ for all $n \ge 2$ $\endgroup$ – steven gregory Jun 10 '18 at 7:28
  • 1
    $\begingroup$ If $q$ is a prime with $q^2|p$ , then $q^k\equiv q\mod p$ would imply $q^k\equiv q\mod q^2$ which is false for $k\ge 2$ , so only $k=1$ would satisfy the congruence, but this congruence is trivial. Hence the condition that $p$ is squarefree is also necessary. $\endgroup$ – Peter Jun 10 '18 at 7:52
2
$\begingroup$

Yes, for the base $b=10=2\cdot 5$ it follows from Fermat's little theorem: $a^5\equiv a\pmod{5}$ and $a^2\equiv a\pmod{2}$ (which implies that $a^5\equiv a\pmod{2}$). Hence $a^5\equiv a\pmod{2\cdot 5}$.

In a similar way, if $b$ is the product of distinct primes $p_1, p_2,\dots, p_r$ with $r>0$, then $a^{p_i}\equiv a\pmod{p_i}$ for $i=1,\dots, r$ and for $m=\text{lcm}(p_1-1,p_2-1,\dots,p_r-1)+1>1$ it follows that $a^m\equiv a\pmod{b}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.