last digit problem: What are the last two digits of 2017^2017 ?

i recently have seen someone using binomial theorem to expand 17^2017. how is that possible?

Can you quote what they did, or give a link to it? Why do you think it is not possible, if you have seen it done?

The first thing that comes to mind is that expanding (10 + 7)^2017 could be a justification of the rule for working mod 10 (namely, that all but the last term is a multiple of 10, and can be dropped). But you'll have to show me.
 
Can you quote what they did, or give a link to it? Why do you think it is not possible, if you have seen it done?

The first thing that comes to mind is that expanding (10 + 7)^2017 could be a justification of the rule for working mod 10 (namely, that all but the last term is a multiple of 10, and can be dropped). But you'll have to show me.
I have not previously contributed to this thread because people were giving such excellent answers, but I was severely tempted several times, particularly when the OP claimed that problems of this type could be solved only by modular arithmetic. Problems of this type can be solved even by someone who has never heard of modular arithmetic.

The last m digits of integer i to the n power necessarily repeat with a cycle no greater than 10^m. In other words, the pattern of the final two digits of the powers of 2017 repeats precisely with a cycle no greater than 100. The moment that you find that pattern, which can be done using ordinary arithmetic, you can divide the power by the length of the cycle, and use the remainder to determine where this power falls within the cyclic pattern of two final digits.

Proving the validity of that algorithm can be done using the binomial theorem.
 

That's an interesting technique to use when you need more digits.

When you are reading relatively advanced math, it is important to work through what is being done step by step in order to fill in gaps, so you are expected to try applying the binomial theorem and see for yourself what is being done.

What he omitted was an explicit statement that he could drop the rest of the terms, because they are all multiples of 10,000. That is an extension of the use I mentioned, where I kept only one term.
 
1) i know of certain tricks like :

last 2 digits of 24^ odd number - 24
last 2 digits of 24^ even number - 76
last 2 digits of 25^ anything more than 1 is - 625

Can you share any more tricks related to last digits?

2) Quite some time ago, I read you can find the last 2 digits of any number ending with 1. Like 21^800. But, unfortunately I cannot recall where I read that. It had something to do with multiplying the digits of the base and power.
 
1) i know of certain tricks like :

last 2 digits of 24^ odd number - 24
last 2 digits of 24^ even number - 76
last 2 digits of 25^ anything more than 1 is - 625

Can you share any more tricks related to last digits?

2) Quite some time ago, I read you can find the last 2 digits of any number ending with 1. Like 21^800. But, unfortunately I cannot recall where I read that. It had something to do with multiplying the digits of the base and power.
\(\displaystyle \displaystyle x = (100h + 10t + 1)^n = \left ( \sum_{j=0}^n \dbinom{n}{j} * (100h + 10t)^{(n-j)} * 1^j \right ) =\)

\(\displaystyle 1 + \left ( \sum_{j=0}^{n-1} \dbinom{n}{j} * 10^{(n-j)} * (10h + t)^{(n-j)} \right ) =\)

\(\displaystyle 1 + \left ( \dbinom{n}{n-1} * 10^{\{n -(n-1)\}} * (10h + t)^{\{n - (n - 1)\}} \right ) + 100p =\)

\(\displaystyle 1 + \{n * 10^1 * (10h + t)^1\} + 100p = 1 + 100hn + 10nt + 100p = 1 + 10nt + 100(p + hn).\)

\(\displaystyle \text {But } tn = 10u + v \implies 10tn = 100u + 10v \implies x = 100(p + hn + u) + 10v + 1.\)

What this means in words is the the final two digits are v and 1, where v is the final digit of the product of n and t.

So the final two digits of 41^3 are 21.
 
Last edited:
Suppose I have a basic calculator, even one without exponentiation.

I can form a table for the last two digits of the powers of 17 and use it again for more than one problem.
(I have separated digits in the right-hand column for emphasis.)

1*17 = 17
17*17 = 2 89
89*17 = 15 13
13*17 = 2 21
21*17 = 3 57
57*17 = 9 69
69*17 = 11 73
73*17 = 12 41
41*17 = 6 97
97*17 = 16 49
49*17 = 8 33
33*17 = 5 61
61*17 = 10 37
37*17 = 6 29
29*17 = 4 93
93*17 = 15 81
81*17 = 13 77
77*17 = 13 09
9*17 = 1 53
53*17 = 9 01

It is cycling through again.


\(\displaystyle 2017^{2017} \ = \ 2017^{2000 + 17} \ = \ 2017^{2000}*2017^{17} \ = \ (2017^{20})^{100}*2017^{17} \ \ leads \ \ to \ \ 1*2017^{17}\)

The seventeenth line down in the list shows that the last two digits for the problem are 7, 7.


_________________________________________________________________________


Here's an example of mine using the already created list and the basic calculator.

What are the last two (rightmost) digits of \(\displaystyle \ 2017^{201720} \ \)?

You can likely answer it faster than WolframAlpha.

In WolframAlpha, type "last two digits of 2017^201720" (without the quotation marks) and press the equals icon on the screen to the right of it.


By hand, the calculator, and the list we have:


\(\displaystyle 2017^{201720} \ = \ (2017^{20})^{10086} \ \ leads \ \ to \ \ 1^{10086}\)

The last two digits are 1, 7.
 
Top