$1995$ Hungarian Olympiad Number theory Problem

161 Views Asked by At

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?

i seen same question here Number Theory - Decimal Representation Question. Difficulty understanding a given solution.

i have read joriki answer there but i am not convinced with that solution, because calculating last digit of $x^x$ for $x=1, 2, \ldots , 19$ is not easy.

Now

We cannot have $k \geq 5,$ since then one of the terms would be divisible by 5 and so would end in a different digit than those not divisible by $5 .$

Hence $k \leq 4 .$

but for $k=4$ i am not able to prove that $(n+2)^{n+2}, (n+4)^{n+4}, (n+6)^{n+6},(n+8)^{n+8}$ all of them cannot end with same digit... any solution ??

thankyou

1

There are 1 best solutions below

0
On

First approach that doesn't require considering all $x^x$, and just applies basic modulo techniques.

Consider $k = 4$.

For odd $n$, 1 raised to odd(any) power ends with 1, 9 raised to odd power ends with 9.
Hence no solutions.

For even $n$, suppose we have a solution.
Since $n$ is a multiple of 5, thus $n= 10j$ for some $j$.
Since 4 raised to even power ends with 6, so all of the terms end with 6, which gives us $$ (n+2)^{n+2}\times(n+4)^{n+4}\times(n+6)^{n+6}\times(n+8)^{n+8} \equiv 6 \pmod{10}$$
However, this expression can also be calculated this:
$$ (2\times 4\times 6 \times 8) ^ n \times 2^2\times4^4\times6^6\times 8^8 \equiv 4^n \times 4 \equiv 6 \times 4 \equiv 4 \pmod{10}. $$
This is a contradiction, hence no solutions.


Second approach that looks at $x^x$, but just for 2 cases. I'd agree that it's not that much different from Jokiri / the official solution.

Consider $k = 4$.

For odd $n$, 1 raised to odd(any) power ends with 1, 9 raised to odd power ends with 9. Hence no solutions.

For even $n$, 6 raised to even(any) power ends with 6. Then, show that

  • for even $j$, $ a = 10j+2, a^a \equiv 4 \pmod{10}$. We know this because $a^i$ cycles through $2, 4, 8, 6, \ldots $, and the 2nd, 22nd, 42nd, etc term is 4.
  • and for odd $j$, $ a = 10j+8, a^a \equiv 4 \pmod{10}$. We know this because $a^i$ cycles through $8, 4, 2, 6, \ldots$, and the 18th, 38th, 58th, etc term is 4.
    Hence, there are no solutions.
    (Note: This explains the observation in the first approach. The other 3 terms end with 6, but this 4th term will be 4.)