3
$\begingroup$

This question is from the 1995 Hungarian Mathematical Olympiad.

Let $k, n$ be positive integers such that $(n+2)^{n+2}, (n+4)^{n+4}, (n+6)^{n+6}, ..., (n+2k)^{n+2k}$ end in the same digit in decimal representation. At most how large is $k$?

A solution given in the book uses this crux argument:

Since $x^5 \equiv x\pmod {10}$, $x^x \pmod {10}$ depends only on $x \pmod{20}$.

Then, the author proceeds to tabulate the last digit of $x^x$ for $x=1, 2, \ldots , 19$ and looks for the longest run of same digits.

My confusion:

I understand that $x^5 \equiv x\pmod {10}$, but I cannot understand the inference that this must imply that $x^x \pmod {10}$ must depend only on $x \pmod {20}$.

Can someone help me understand the second part of the crux argument. Thank you.

$\endgroup$

1 Answer 1

1
$\begingroup$

The period of $x^n\pmod{10}$ with respect to $n$ is $4$. Also, $n^x\pmod{10}$ has a period of $10$ with respect to $n$. Thus $x^x\pmod{10}$ has a period $\operatorname{lcm}(4,10)=20$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .