Last Digit Of n n n^n Summation

1 1 + 2 2 + 3 3 + + 100 0 1000 \large 1^1 + 2^2 + 3^3 + \cdots + 1000^{1000}

Find the last digit of the number above.

0 1 2 4 5 6 8 7

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Aritra Das
Mar 13, 2016

If you don't mind, I'll explain.

You see, a b ( m o d m ) a n b n ( m o d m ) a \equiv b \pmod m \implies a^n \equiv b^n \pmod m So, if you consider only the unit's digits, then you are essentially taking modulo 10 at every step. So, say, ... 13 n 3 n ( m o d 10 ) {13}^n \equiv 3^n \pmod {10} because 13 3 ( m o d 10 ) 13 \equiv 3 \pmod {10} . Hence, in the summation in question, the base repeats every after every ten numbers.

As for the power, they have a periodicity or cyclicity in modulo 10. For numbers ending in 0 , 1 , 5 , 6 0, 1, 5, 6 the cycle is of length 1 (Last digit of any positive power of such a number is same as that of the number itself like, 11 2 = 121 {11}^2 = 121 has last digit 1 which is same as 11).

For those ending in 2 , 3 , 7 , 8 2, 3, 7, 8 , the cycle is of length 4. (For these numbers, a 4 k + n a n ( m o d 10 ) a^{4k+n} \equiv a^n \pmod {10} where a is one of these numbers)

For those ending in 4 and 9, the cycle is of length 2.

Hence, the lowest common multiple of these powers is 4. Thus, for all numbers a 4 k + n a n ( m o d 10 ) a^{4k+n} \equiv a^n \pmod {10} where n n is positive.

So powers repeat every four terms and bases repeat every 10 terms. Hence doing the LCM again, base powers \text{base}^{\text{powers}} repeats after every 20 terms atmost in integers modulo 10.

That is, ( a + 10 j ) 4 k + n a n ( m o d 10 ) (a+10j)^{4k+n} \equiv a^n \pmod {10} So, ( n + 20 k ) n + 20 k n n ( m o d 10 ) (n+20k)^{n+20k} \equiv n^n \pmod {10}

Note : So we can group the terms as such: 1000 20 ( 1 1 + 2 2 + + 2 0 20 ) 0 ( m o d 10 ) \dfrac{1000}{20} \left(1^1 + 2^2 + \cdots + 20^{20} \right) \equiv \boxed0 \pmod{10} .

You should cross check manually (use a calculator or something ... ) to see whether this holds. Hope this helps!

Chew-Seong Cheong
Mar 12, 2018

Let N N be the given number. Then:

N ( k = 1 1000 k k ) (mod 10) Let k = 10 i + j as follows. ( i = 0 99 j = 0 9 ( 10 i + j ) 10 i + j + 100 0 1000 ) (mod 10) j 0 when i = 0 ( i = 0 99 j = 0 9 j 10 i + j ) (mod 10) ( j = 0 9 j j i = 0 99 j 10 i ) (mod 10) ( j = 0 9 a j ) (mod 10) where a j = j 2 i = 0 99 j 10 i \begin{aligned} N & \equiv \left(\sum_{k=1}^{1000} k^k \right) \text{ (mod 10)} & \small \color{#3D99F6} \text{Let }k=10i + j \text{ as follows.} \\ & \equiv \left(\sum_{i=0}^{99} \sum_{j=0}^9 (10i+j)^{10i+j} +1000^{1000} \right) \text{ (mod 10)} & \small \color{#3D99F6} j \ne 0 \text{ when }i = 0 \\ & \equiv \left(\sum_{i=0}^{99} \sum_{j=0}^9 j^{10i+j} \right) \text{ (mod 10)} \\ & \equiv \left(\sum_{j=0}^9 j^j \sum_{i=0}^{99} j^{10i} \right) \text{ (mod 10)} \\ & \equiv \left(\sum_{j=0}^9 a_j \right) \text{ (mod 10)} & \small \color{#3D99F6} \text{where } a_j = j^2 \sum_{i=0}^{99} j^{10i} \end{aligned}

Then we have

  • j = 0 a 0 0 (mod 10) j=0 \implies a_0 \equiv 0 \text{ (mod 10)} .
  • j = 1 a 1 1 1 i = 0 99 1 100 0 (mod 10) j=1 \implies a_1 \equiv 1^1 \displaystyle \sum_{i=0}^{99} 1 \equiv 100 \equiv 0 \text{ (mod 10)} .
  • j = 2 a 2 2 2 i = 0 99 2 10 i 4 i = 0 99 4 5 i i = 1 100 4 5 i 4 × 50 ( 4 + 6 ) 0 (mod 10) j= 2 \implies \displaystyle a_2 \equiv 2^2 \sum_{i=0}^{99} 2^{10i} \equiv 4 \sum_{i=0}^{99} 4^{5i} \equiv \color{#3D99F6} \sum_{i=1}^{100} 4^{5i} \equiv 4\times 50(4+6) \equiv 0 \text{ (mod 10)} . Note that 4 n { 4 (mod 10) when n is odd. 6 (mod 10) when n is even. \color{#3D99F6} 4^n \equiv \begin{cases} \text{4 (mod 10)} & \small \text{when }n \text{ is odd.} \\ \text{6 (mod 10)} & \small \text{when }n \text{ is even.} \end{cases}
  • j = 3 a 3 3 3 i = 0 99 3 10 i 7 i = 0 99 9 5 i 7 i = 0 99 ( 10 1 ) 5 i 7 i = 0 99 ( 1 ) 5 i 0 (mod 10) j=3 \implies \displaystyle a_3 \equiv 3^3 \sum_{i=0}^{99} 3^{10i} \equiv 7 \sum_{i=0}^{99} 9^{5i} \equiv 7\sum_{i=0}^{99} (10-1)^{5i} \equiv 7\color{#3D99F6} \sum_{i=0}^{99} (-1)^{5i} \equiv 0 \text{ (mod 10)} . Note that ( 1 ) n { -1 (mod 10) when n is odd. 1 (mod 10) when n is even. \color{#3D99F6} (-1)^n \equiv \begin{cases} \text{-1 (mod 10)} & \small \text{when }n \text{ is odd.} \\ \text{1 (mod 10)} & \small \text{when }n \text{ is even.} \end{cases}
  • j = 4 a 4 4 4 i = 0 99 4 10 i 6 i = 0 99 6 6 ( 100 × 6 ) 0 (mod 10) j= 4 \implies \displaystyle a_4 \equiv 4^4 \sum_{i=0}^{99} 4^{10i} \equiv 6 \color{#3D99F6} \sum_{i=0}^{99} 6 \equiv 6(100\times 6) \equiv 0 \text{ (mod 10)} . Note that 4 n 6 (mod 10) \color{#3D99F6} 4^n \equiv 6 \text{ (mod 10)} , when n n is a positive even integer.
  • j = 5 a 5 5 5 i = 0 99 5 10 i 5 i = 0 99 5 5 ( 100 × 5 ) 0 (mod 10) j= 5 \implies \displaystyle a_5 \equiv 5^5 \sum_{i=0}^{99} 5^{10i} \equiv 5 \color{#3D99F6} \sum_{i=0}^{99} 5 \equiv 5(100\times 5) \equiv 0 \text{ (mod 10)} . Note that 5 n 5 (mod 10) \color{#3D99F6} 5^n \equiv 5 \text{ (mod 10)} for all n N n \in \mathbb N .
  • j = 6 a 6 6 6 i = 0 99 6 10 i 6 i = 0 99 6 6 ( 100 × 6 ) 0 (mod 10) j= 6 \implies \displaystyle a_6 \equiv 6^6 \sum_{i=0}^{99} 6^{10i} \equiv 6 \color{#3D99F6} \sum_{i=0}^{99} 6 \equiv 6(100\times 6) \equiv 0 \text{ (mod 10)} . Note that 6 n 6 (mod 10) \color{#3D99F6} 6^n \equiv 6 \text{ (mod 10)} for all n N n \in \mathbb N .
  • j = 7 a 7 7 7 i = 0 99 7 10 i 7 7 i = 0 99 4 9 5 i 7 7 i = 0 99 9 5 i 7 7 i = 0 99 ( 10 1 ) 5 i 7 7 i = 0 99 ( 1 ) 5 i 0 (mod 10) j=7 \implies \displaystyle a_7 \equiv 7^7 \sum_{i=0}^{99} 7^{10i} \equiv 7^7 \sum_{i=0}^{99} 49^{5i} \equiv 7^7 \sum_{i=0}^{99} 9^{5i} \equiv 7^7\sum_{i=0}^{99} (10-1)^{5i} \equiv 7^7 \sum_{i=0}^{99} (-1)^{5i} \equiv 0 \text{ (mod 10)} .
  • j = 8 a 8 8 8 i = 0 99 8 10 i 8 8 i = 0 99 4 15 i 8 8 × 50 ( 4 + 6 ) 0 (mod 10) j= 8 \implies \displaystyle a_8 \equiv 8^8 \sum_{i=0}^{99} 8^{10i} \equiv 8^8 \sum_{i=0}^{99} 4^{15i} \equiv 8^8 \times 50(4+6) \equiv 0 \text{ (mod 10)} .
  • j = 9 a 9 9 9 i = 0 99 9 10 i 9 9 i = 0 99 ( 10 1 ) 10 i 9 9 i = 0 99 1 9 9 × 100 0 (mod 10) j=9 \implies \displaystyle a_9 \equiv 9^9 \sum_{i=0}^{99} 9^{10i} \equiv 9^9 \sum_{i=0}^{99} (10-1)^{10i} \equiv 9^9 \sum_{i=0}^{99} 1 \equiv 9^9 \times 100 \equiv 0 \text{ (mod 10)} .

We note that a 0 a 1 a 2 a 9 0 (mod 10) a_0 \equiv a_1 \equiv a_2 \equiv \cdots \equiv a_9 \equiv 0 \text{ (mod 10)} , therefore, N j = 0 0 a j 0 (mod 10) N \equiv \displaystyle \sum_{j=0}^0 a_j \equiv \boxed{0} \text{ (mod 10)} .

Giorgos K.
Mar 20, 2018

Mathematica

Mod[Total@Array[#^# &, 1000], 10]

returns 0

Hana Wehbi
Mar 13, 2018

Very Nice problem.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...