Finding units digit of exponent to an exponent

55 Views Asked by At

How do you find the units digit of $$2^{2^2}+4^{4^4}+6^{6^6}+\cdots+2016^{2016^{2016}}+2018^{2018^{2018}}$$

I've been trying to find a pattern here but I can't.

1

There are 1 best solutions below

0
On

The summands are of the form $$ (2m)^{(2m)^{2m}}$$ with $1\le m\le 1009$. As $(2m)^{2m}=2^{2m}m^{2m}=4\cdot 2^{2(m-1)}m^{2m}$, the exponent is always a positive multiple of $4$. For all naturals $n$, $n^4\equiv n\pmod 2$ and either $n^4\equiv 0\pmod 5$ (namely, when $n\equiv 0\pmod 5$) or $n^4\equiv 1\pmod 5$ (in all other cases - little Fermat). It follows by the Chinese Remainder Theorem${}^1$ that $(2m)^4\equiv 6\pmod {10}$ for all $m$, except that $(2m)^4\equiv 0\pmod{10}$ when $2m$ is a multiple of $10$. As $6^k\equiv 6\pmod{10}$, it follows that $$(2m)^{(2m)^{2m}}\equiv (2m)^{4k}\equiv 6^k\equiv 6\pmod {10}$$ except when $2m$ is a multiple of $10$. As the final sum has $1009$ summands, of which $403$ are multiples of $10$, the whole sum is $\equiv 4\pmod{10}$.

${}^1$ Alternatively, just verify $n^4\equiv 6\text{ or }0\pmod{10}$ manually for the few cases there are.