The misterious digit

12345678 9 123456789 + 1234567 8 12345678 + 123456 7 1234567 + 12345 6 123456 + 1234 5 12345 + 123 4 1234 + 12 3 123 + 1 2 12 + 1 1 123456789^{123456789} + 12345678^{12345678} + 1234567^{1234567} \\ + 123456^{123456} + 12345^{12345} + 1234^{1234} \\ + 123^{123} + 12^{12} + 1^{1}

What is the unit digit of the sum above?

7 5 0 9 1

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.

3 solutions

Chew-Seong Cheong
Jul 16, 2019

Let the given sum be N N . We need to find N m o d 10 N \bmod 10 .

N 9 12345678 9 123456789 9 123456789 ( 10 1 ) 123456789 1 (mod 10) \begin{aligned} N_9 & \equiv 123456789^{123456789} \equiv 9^{123456789} \equiv (10-1)^{123456789} \equiv -1 \text{ (mod 10)} \end{aligned}

N 8 1234567 8 12345678 8 12345678 ( 10 2 ) 12345678 2 4 n + 2 Since 2 4 n 6 (mod 10), where n is an integer. 6 × 4 4 (mod 10) \begin{aligned} N_8 & \equiv 12345678^{12345678} \equiv 8^{12345678} \\ & \equiv (10-2)^{12345678} \equiv 2^{4n+2} & \small \color{#3D99F6} \text{Since }2^{4n} \equiv 6 \text{ (mod 10)} \text{, where }n \text{ is an integer.} \\ & \equiv 6 \times 4 \equiv 4 \text{ (mod 10)} \end{aligned}

N 7 123456 7 1234567 7 1234567 Since gcd ( 7 , 10 ) = 1 , Euler’s theorem applies 7 1234567 m o d ϕ ( 10 ) 7 1234567 m o d 4 Euler’s totient function ϕ ( 10 ) = 4 7 3 3 (mod 10) \begin{aligned} N_7 & \equiv 1234567^{1234567} \equiv 7^{1234567} & \small \color{#3D99F6} \text{Since } \gcd(7,10) = 1 \text{, Euler's theorem applies} \\ & \equiv 7^{1234567 \bmod \phi (10)} \equiv 7^{1234567 \bmod 4} & \small \color{#3D99F6} \text{Euler's totient function }\phi (10) = 4 \\ & \equiv 7^3 \equiv 3 \text{ (mod 10)} \end{aligned}

N 6 12345 6 123456 6 123456 6 (mod 10) All powers of 6 end with 6. \begin{aligned} N_6 & \equiv 123456^{123456} \equiv 6^{123456} \equiv 6 \text{ (mod 10)} & \small \color{#3D99F6} \text{All powers of 6 end with 6.} \end{aligned}

N 5 1234 5 12345 5 123456 5 (mod 10) All powers of 5 end with 5. \begin{aligned} N_5 & \equiv 12345^{12345} \equiv 5^{123456} \equiv 5 \text{ (mod 10)} & \small \color{#3D99F6} \text{All powers of 5 end with 5.} \end{aligned}

N 4 123 4 1234 4 1234 4 2 n 6 (mod 10) Since 4 2 n 6 (mod 10), where n is an integer. \begin{aligned} N_4 & \equiv 1234^{1234} \equiv 4^{1234} \equiv 4^{2n} \equiv 6 \text{ (mod 10)} & \small \color{#3D99F6} \text{Since }4^{2n} \equiv 6 \text{ (mod 10)} \text{, where }n \text{ is an integer.} \end{aligned}

N 3 12 3 123 3 123 3 ( 10 1 ) 61 3 (mod 10) \begin{aligned} N_3 & \equiv 123^{123} \equiv 3^{123} \equiv 3(10-1)^{61} \equiv -3 \text{ (mod 10)} \end{aligned}

N 2 1 2 12 2 12 2 4 n 6 (mod 10) \begin{aligned} N_2 & \equiv 12^{12} \equiv 2^{12} \equiv 2^{4n} \equiv 6 \text{ (mod 10)} \end{aligned}

N 1 1 1 1 (mod 10) \begin{aligned} N_1 & \equiv 1^1 \equiv 1 \text{ (mod 10)} \end{aligned}

Therefore,

N N 9 + N 8 + N 7 + N 6 + N 5 + N 4 + N 3 + N 2 + N 1 1 + 4 + 3 + 6 + 5 + 6 3 + 6 + 1 27 7 (mod 10) \begin{aligned} N & \equiv N_9 + N_8 + N_7 + N_6 + N_5 + N_4 + N_3 + N_2 + N_1 \\ & \equiv -1 + 4 + 3 + 6 + 5 + 6 - 3 + 6 + 1 \equiv 27 \equiv \boxed 7 \text{ (mod 10)} \end{aligned}


References

Francesco Marroni
Jul 13, 2019

First, we'll calculate the digit unit of each number, then we're going tu sum all of them. Let's start with 123456789 123456789 {123456789}^{123456789} . Our attention is focused on the base's digit unit, and in this case it's 9 9 . There are two ways to calculate the digit unit of this enormous number. If you know that the sequence of power of 9 9 , so 9 9 , 81 81 , 729 729 ,... has also a sequence of unit digits, you're advantaged: the number will end with a 9 9 if the exponent is odd, instead the number will end with 1 1 if it's even. You can quickly understand that, since the exponent is odd, the number will end with 9 9 . But there is also another way to solve it, and personally I prefer this one: [ 123456789 × 123456789 × . . . × 123456789 ] 10 [123456789 \times 123456789 \times ... \times 123456789]_{10} = [ 9 × 9 × 9 × . . . × 9 ] 10 [9 \times 9 \times 9 \times ... \times 9]_{10} . At this step we know that 9 × 9 = 81 9 \times 9 = 81 so we can substitute each couple of 9 9 with a 1 1 . The 9 9 is repeated 123456789 123456789 times, and this is an odd number, so just one 9 9 will be left. Here is the next step: [ 1 × 1 × 1 × . . . × 1 × 9 ] 10 [1 \times 1 \times 1 \times ... \times 1 \times 9]_{10} = [ 9 ] 10 [9]_{10} . We can conclude that if we divide 123456789 123456789 {123456789}^{123456789} by 10 10 we obtain 9 9 . For any of the numbers to sum the methods are all the same as shared above, so, I know, it's pretty boring. Let's calculate the digit number of 12345678 12345678 {12345678}^{12345678} . In this case it's much better to use the first way, so we have to know that the sequence of unit digits of the power of 8 8 is: 8 8 , 4 4 , 2 2 , 6 6 , 8 8 , 4 4 , 2 2 , 6 6 , ... where the period 8426 8 4 2 6 is repeated endlessly. Now another problem approaches: in this sequence, what digit will be in the 12345678 12345678 place? It's easier than it looks: since the period in made by 4 elements, we only have to discover what number multiple of 4 4 is the nearest to 12345678 12345678 . It can be also the same number because it's even, we only have to verify that you can divide it by 4. I'll verify it this way, by dividing it by 2 and verifying the result is still even. But if I calculate 12345678 2 \frac{12345678}{2} I obtain an odd number, so it means that 12345678 12345678 is a multiple of 2 2 , but not of 4 4 . If any integer n n is even but not multiple of 4 4 , then n 2 n-2 and n + 2 n+2 are certainly multiples of 4 4 . In this case, it means that 12345676 12345676 is a multiple of 4: the number in the 12345676 12345676 position will be the last number of the sequence, so it will be 6 6 . The sequence will repeat, and we can conclude that the number in the 12345678 12345678 position is the second of the sequence, so it's 4 4 . This can be applied to all of the powers to sum: discover the unit digit sequence of the power of the number (and the number is the base's unit digit), and calculate wich number of the sequence will be in the position determined by the exponent. There are 3 particular powers in this expression that make we calculate the unit digit much more quickly: 12345 6 123456 123456^{123456} , 1234 5 12345 12345^{12345} and 123 4 1234 1234^{1234} . The unit digit sequence of the powers of 6 6 is 6 6 , 6 6 , 6 6 , 6 6 ,... so it will always be 6 6 . The same happens with 5 5 . Calculating the unit digits of 12345 6 123456 123456^{123456} and 1234 5 12345 12345^{12345} is, then, very easy: respectively, 6 6 and 5 5 . Also calculating the 123 4 1234 1234^{1234} unit digit is easier than the other cases: the unit digit sequence is 4 4 , 6 6 , 4 4 , 6 6 , ... (so it's like the 9 9 ) : the number will end with 4 4 if the exponent is odd, instead it will end with 6 6 . Since the exponent 1234 1234 is even the number will end with 6 6 . At the end, once we have substituted each power with its unit digit, we obtain: 9 + 4 + 3 + 6 + 5 + 6 + 7 + 6 + 1 = . . . 7 9+4+3+6+5+6+7+6+1=...7 . We just wanted to know the unit digit that is 7 7 .

It's my first problem that I invented and posted, so I'm not very good at explaining xD. Tell me about any doubts you have!

Francesco Marroni - 1 year, 11 months ago

Just some advice for formatting, 2 enters is a line break, but nice solution

Δrchish Ray - 1 year, 11 months ago
Jesse Nieminen
Jul 17, 2019

Let x = 12345678 9 123456789 + 1234567 8 12345678 + 123456 7 1234567 + 12345 6 123456 + 1234 5 12345 + 123 4 1234 + 12 3 123 + 1 2 12 + 1 1 . x = 123456789^{123456789} + 12345678^{12345678} + 1234567^{1234567} + 123456^{123456} + 12345^{12345} + 1234^{1234} + 123^{123} + 12^{12} + 1^1.

As sum of five odd numbers and four even numbers, x x must be odd and thus x 1 ( m o d 2 ) . x \equiv 1 \pmod{2}.

Now Fermat's Little Theorem tells us that a 5 a ( m o d 5 ) a^5 \equiv a \pmod{5} which implies that a 4 n + m a m ( m o d 5 ) a^{4n + m} \equiv a^m \pmod{5} . Also by the definition of conguerence 5 k + a a ( m o d 5 ) 5k + a \equiv a \pmod{5} and thus also ( 5 k + a ) 4 n + m a m ( m o d 5 ) . \left(5k + a\right)^{4n + m} \equiv a^m \pmod{5}.

Therefore x 4 3 + 3 2 + 2 3 + 1 0 + 0 1 + 4 2 + 3 3 + 2 0 + 1 1 64 + 9 + 8 + 1 + 0 + 16 + 27 + 1 + 1 4 + 4 + 3 + 1 + 0 + 1 + 2 + 1 + 1 2 ( m o d 5 ) . x \equiv 4^3 + 3^2 + 2^3+ 1^0 + 0^1 + 4^2 + 3^3 + 2^0 + 1^1 \equiv 64 + 9 + 8 + 1 + 0 + 16 + 27 + 1 + 1 \equiv 4 + 4 + 3 + 1 + 0 + 1 + 2 + 1 + 1 \equiv 2 \pmod{5}.

Since 2 2 and 5 5 are coprime, by the Chinese Remainder Theorem , the solution to { x 1 ( m o d 2 ) x 2 ( m o d 5 ) \begin{cases} x \equiv 1 \pmod{2} \\ x \equiv 2 \pmod{5} \end{cases} is unique ( m o d 10 ) \pmod{10} .

It is easy to see that 7 \boxed{7} is the solution.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...