Is there any way to calculate the remainder of $1^1$ + $2^2$ + $3^3$ + ... + $2020^{2020}$ when divided by 10 without calculator?
-
Probably the first thing that comes to mind to me is to realize that, for any of the numbers of the sum, only its one's digit to the power is the relevant bit with respect to the sum modulo 10. There's probably something more elaborate but that's a start at least. – PrincessEev Jan 09 '19 at 02:51
-
See this question and the answer there https://math.stackexchange.com/questions/2578034/ – JimmyK4542 Jan 09 '19 at 02:57
-
Also compare with https://math.stackexchange.com/questions/2578034/passing-that-ball-on-where-does-it-end-up-in – David K Jan 09 '19 at 05:04
-
And also a duplicate of this. Quick to find with Approach0. – Jyrki Lahtonen Jan 09 '19 at 05:39
2 Answers
Hint $\bmod 10\!:\ n^{\large\color{#c00}{k+4j}}\equiv n^{\large k}\,$ for $\,k>0,\,$ by $\, n^{\large k+4j}\!-n^{\large k} \equiv n^{\large k}(n^{\large 4j}\!-1) \equiv 0\, $ by here.
So $\,(n\!+\!20)^{\large n+20}\!\equiv n^{\large\color{#c00}{ n+4\cdot 5}}\!\equiv n^{\large n}\,$ for $\,n>0\,$ so $\!\bmod 10$ the summands repeat in cycles of length $20,\,$ so we need only compute a single cycle sum, which is easy using above, e.g. $\,17^{\large 17}\!\equiv 7^{\large\color{#c00}{ 1+4\cdot 4}}\!\equiv 7^{\large 1}$.

- 272,048
-
Note: $\ 20 = {\rm lcm}(10,\color{#c00}4),$ explains the cycle length. $\ \ $ – Bill Dubuque Jan 09 '19 at 05:16
You may split it into $\mod 2$ and $\mod 5$:
$\mod 2$: \begin{eqnarray*} \sum_{n=1}^{2020}n^n & \equiv_2 & 1010\cdot 1 \\ & \equiv_2 & 0 \\ \end{eqnarray*} $\mod 5$: \begin{eqnarray*} \sum_{n=1}^{2020}n^n & \equiv_5 & \sum_{k=0}^{403}\left((5k+1)^{5k+1} + (5k+2)^{5k+2}+(5k+3)^{5k+3}+(5k+4)^{5k+4} \right) \\ & \stackrel{\mbox{Fermat}}{\equiv_5} & \sum_{k=0}^{403}\left(1 + 2^{k+2}+3^{k+3}+4^{k+4} \right)\\ & \equiv_5 & \sum_{k=0}^{403}\left(1 + 2^{k+2}+(-2)^{k+3}+(-1)^{k+4} \right)\\ & \equiv_5 & -1 + \sum_{k=0}^{403}\left(2^{k+2}+(-2)^{k+3}\right) + 0\\ & \equiv_5 & -1 - \sum_{k=0}^{403}2^{k+2} \\ & \equiv_5 & -1 + \sum_{k=0}^{403}2^{k} \\ & \equiv_5 & -1 + 2^{404} - 1 \\ & \stackrel{\mbox{Fermat}}{\equiv_5} & -1 \\ \end{eqnarray*} So, $\sum_{n=1}^{2020}n^n \equiv_2 0$ and $\sum_{n=1}^{2020}n^n\equiv_5 -1 \equiv_5 4 \Rightarrow \boxed{\sum_{n=1}^{2020}n^n \equiv_{10} 4}$

- 32,243