K = n = 1 ∑ 1 0 0 1 n n
Find the last digit of K .
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.
WOW short and neat! +1
So, that is how it is done. I realized there is a period for the last digit of n m but did not know how to explain it.
euler theorem works for the coprimes of 10 only here. for the others how I can be sure of period 20? I determined the period evaluating to 1 to 20. can you answer me? I am confused.
Consider the first forty terms and further split them into 4 partitioned sums:
S 1 S 2 S 3 S 4 = = = = 1 1 + 2 2 + 3 3 + … + 1 0 1 0 1 1 1 1 + 1 2 1 2 + 1 3 1 3 + … + 2 0 2 0 2 1 2 1 + 2 2 2 2 + 2 3 2 3 + … + 3 0 3 0 3 1 3 1 + 3 2 3 2 + 3 3 3 3 + … + 4 0 4 0
We further define S n = ( 1 0 n − 9 ) 1 0 n − 9 + ( 1 0 n − 8 ) 1 0 n − 8 + … + ( 1 0 n ) 1 0 n .
Consider modulo 1 0 , the last digit of a b is simply ( a m o d 1 0 ) b m o d 4 and with a little bit of modular arithmetic, we can easily see that
S 1 S 2 S 3 S 4 ≡ ≡ ≡ ≡ S 5 ≡ S 9 ≡ … ≡ S 9 7 ≡ 7 S 6 ≡ S 1 0 ≡ … ≡ S 9 8 ≡ 7 S 7 ≡ S 1 1 ≡ … ≡ S 9 9 ≡ 7 S 8 ≡ S 1 2 ≡ … ≡ S 1 0 0 ≡ 7
Hence, the summation in question is congruent to
n = 1 ∑ 1 0 0 1 n n = ≡ ( S 1 + S 2 + S 3 + … + S 1 0 0 ) + 1 0 0 1 1 0 0 1 1 0 0 ( 7 ) + 1 ≡ 1
Just found a simpler solution after typing this out:
Consider grouping the terms as such
R 1 R 2 R 3 R 9 = = = … = { 1 1 , 1 1 1 1 , 2 1 2 1 , … , 9 9 1 9 9 1 } { 2 2 , 1 2 1 2 , 2 2 2 2 , … , 9 9 2 9 9 2 } { 3 3 , 1 3 1 3 , 2 3 2 3 , … , 9 9 3 9 9 3 } { 9 9 , 1 9 1 9 , 2 9 2 9 , … , 9 9 9 9 9 9 }
Consider modulo 1 0 like above
R 1 R 2 R 3 R 9 ≡ ≡ ≡ … ≡ { 1 1 , 1 1 1 , 1 2 1 , … , 1 9 9 1 } { 2 2 , 2 1 2 , 2 2 2 , … , 2 9 9 2 } { 3 3 , 3 1 3 , 3 2 3 , … , 3 9 9 3 } { 9 9 , 9 1 9 , 9 2 9 , … , 9 9 9 9 }
Note that the odd terms of each R n are congruent to each other, for example 1 1 ≡ 2 1 2 1 ≡ 4 1 4 1 ≡ … ≡ 9 8 1 9 8 1 ; that goes for the even terms as well. Thus the paired sum must be divisible by 2 1 0 0 = 5 0 .
Hence for some integer k , the summation in question must be of the form n = 1 ∑ 1 0 0 1 n n = [ n = 1 ∑ 1 0 0 0 n n ] + 1 0 0 1 1 0 0 1 ≡ 5 0 k + 1 ≡ 1 .
Log in to reply
Yes, this solution is very similar to mine...we think alike (sometimes)
Log in to reply
Hehe thanks!
Don't mean to change the subject but do you have a smart way to solve this ? All I can think of is: "Is it 1? No. Is it 2? No. Is it 3?? No. yadda yadda yadda. Is it (answer)? Yes!
Log in to reply
@Pi Han Goh – I'm not sure I have a "smart" way, but I sure have a systematic way, the way I approach most congruency problems unless I have a better idea: Factor 25725 and do the problem separately for each prime power factor: 3, 25, and 343. In each case, there are two subcases to consider: p divides a or it doesn't. I hope that helps...
Careful and lucid explanation, as we have come to expect from you...thanks!
Consider if the number on top of sigma is 1000. The sum of n=1 to n=10 ends with a 7. So does the sum of n=11 to 20 and...... and the sum of 991 to 1000.
100*7=700, which ends with 0. So the last digit of the sum of when n=1 to n=1000 is 0
Now 1001^1001 obviously ends with a 1.
1+0=1.
As it ask for the last digit I focused on that. We know that 1^2, always ends in 1, 2^2 in 4, so the sequence is: 1,4,9,6(16), 5(25), 6(36) ,9(49), 4(64), 1(81), 0 (10). If we sum the last digits it will end at 5 (45). If we do it 1000 times it will end in 0, plus the last 1 (1001), that will end in 1.
I just looked at the first 10 values of n and focused on the last digits. I manually worked out the last digits would be 1,4,7,4,5,6,3,6,9,0, which add to 5. (I noticed the symmetry and number bonds so feel there was a way of doing this work quicker) but then 11^11 until 20^20 would have the same last digits so wold also equal 5. This would repeat until 1000, so I wold have 200 sets of numbers with last digits of 5. These added make last digit of 0 then +1 for 1001^1001 term. similar to other methods but interesting that most people went for sets of 20 and I went sets of 10.
You have the right idea, looking for periodicity, but your solution has some issues. There is a mistake in your total from 1 to 10... 4 4 = 2 5 6 ends in a 6, so that the total is 7. Also, and more importantly, you don't get the same digits between 10 and 20... we have a period of 20, but not of 10 (see my solution).
I did the exact same trick but i still yield with 5 as the last digit. I've still not understood the formula explained by Mr Bretscher.
Log in to reply
Which part(s) don't you understand? I will be glad to (try to) explain.
Log in to reply
First of all, i need to study Euler's formula. I am not much familier with that. And if i encouter any problem, i may seek for your help.
Each last digit besides one will be summed 100 times. Out of these: 9, 5, 6, 0 have repeating last digit in there power sequences. So the sum of these powers will be: 100 9,5,6,0 which will have no effect on our summnations last digit since 100 n’s last digit will be zero for all integer ns. 4, 7, 3, 2, 8 have repeating last digit power sequence some even number apart , ex: 3, 9, 27, 81, 243... 4, 16, 64, 256... 7, 49, xx3, xxx1, xxxx7... 2, 4, 8, 16, 64, 32... 8, 64, 512, 4096, xxxx8
For n^n a number with the samelast digit will occur ever 10 away, ex: 3^3, 13^13, 23^23... So the next number with the same last digit will be two reapeats away + 2 for 3,7,2,8 since these repeat their last digit every 4 away (2 4)+2. Since the third number with the same last digit will be 2 ((2 4)+2) away we get (4 4)+4 so the pattern will repeat every two this is a multiple of 4. So from 1-1001 we will have 2 last digits appear 50 times each for 3,7,2,8: 50*n will always have a last digit of 0 for all integers so these numbers do no effect our summnations last digit.
4 will have the same last digit of 6 in n^n for all numbers since it’s power last digit pattern repeats every 2 and every n with a last digit of 4 is 10 away from each other, and 10 is a multiple of 2: 2 5. So all n with a last digit of 4 will have the same last digit of n^n and theses numbers will appear 100 times between 1-1001 so the amount 4 effects the last digit of our summnation is 100 n which will have a last digit of 0 for all integers n. So it wont effect our summnations last digit.
We have shown that all numbers with last digit 2-9 will not effect the above summnations fibal digit. So, only numbers with a last digit of 1 will effect out summnations last digit. Numbers with the last digit 1 will appear 101 times between 1-1001. So it will effect our summnations last digit by the last digit of 101*1 which is equal to 1. So our summnations last digit must be 1
Python 2.7:
1 |
|
This is very cheat.
Problem Loading...
Note Loading...
Set Loading...
Note that ( n + 2 0 ) n + 2 0 ≡ n ( n + 2 0 ) ≡ n n ( m o d 1 0 ) for all positive n ; we can reduce the exponent modulo 4 = ϕ ( 1 0 ) , by Euler's Theorem. Thus the sequence n n ( m o d 1 0 ) has a period of 20. Let S = ∑ n = 1 2 0 n n . Since our sum runs through 2 0 1 0 0 0 = 5 0 periods, with one term n = 1 0 0 1 left over, we have n = 1 ∑ 1 0 0 1 n n ≡ 5 0 S + 1 0 0 1 1 0 0 1 ≡ 1 1 = 1 ( m o d 1 0 )