# Sum of last two digits of 27^27

1. Dec 21, 2014

### Raghav Gupta

It's an amazing question to find sum of last two digits of 27^27 by not using that wolframalpha or calculators.I think binomial theorem would be of help here but not able to apply.can anyone tell me the answer by any method?

2. Dec 21, 2014

### PeroK

If you're allowed paper and pencil, you can just multiply things out and use power reduction.

Can you work out what the last digit is?

3. Dec 21, 2014

You have to use congruence modulo theorem.
That is, if $a,b \in I$ and $m \in I^+$, you can say $a \equiv b(mod(m))$ if a-b is divisible by m.
I had seen this problem somewhere but I'm sure its solved using mod.

Last edited: Dec 21, 2014
4. Dec 21, 2014

Here is how you can find units digit of $27^{27}$
$27 \equiv 7mod10$
$27^2 \equiv 47mod10$
$27^2 \equiv -1mod10$
$27^{14} \equiv 1mod10$
$27^{14}*27^{13}=27^{27} \equiv 27^{13}mod10$
Now $7^{13}=7^{4*3+1}$ has a specialty. It's units digit is always 7.
That is $7^{4k+1}$ has units digit 7.
Therefore $27^{27}$ has units digit 7.

Last edited: Dec 21, 2014
5. Dec 21, 2014

### willem2

if 27^2 = -1 (mod 10), then 27^14 is also -1 (mod 10) and not 1.

It can be done even simpler:

27^27 = 3^81
Now use eulers theorem:

$$a^{\phi(n)} = 1 (mod n)$$

phi(100) = phi(4) * phi(25) = (4/2) * (25 * 4/5) = 40, so 3^40 = 1 (mod 100)
3^81 = 3^40 * 3^40 * 3 = 1 * 1 * 3 = 3 (mod) 100

6. Dec 21, 2014

### Raghav Gupta

But something's wrong here.According to Wolframalpha the unit digit is coming 3 and second last digit 0.So the sum is 3.Therefore the unit digit is not 7.

7. Dec 22, 2014

### Raghav Gupta

But how $27^2\equiv 47mod10$ $$27^2-47$$is not divisible by 10.

8. Dec 22, 2014

### jbriggs444

Clearly $27^2$ is equal to 49 and hence is congruent to 49 modulo 10. Clearly, this means that it is also congruent to -1 modulo 10. So the "47" is a simple typo.

As to the units digit coming out 3... That is a brain-o. The units digit in $7^n$ cycles through 1, 7, 9, 3 in a cycle of length 4 as n increases sequentially. But 27 is not equal to 4k+1 for some integer k. Instead, 27 is equal to 4k-1 for some integer k. (In particular for k = 7).

So instead of being equal to 7 -- (the cycle element at place 1), it is equal to 3 (the cycle element at place 3).

9. Dec 22, 2014

### Raghav Gupta

There were certain errors in AdityaDev's post which you corrected.Thanks.But what about second last digit?The topic is to find the sum of last two digits.The last digit could have been figured without modular arithmetic that is the way you posted by the unit cycle method.

10. Dec 23, 2014

Sorry. Typing error.

11. Dec 24, 2014

### Raghav Gupta

That's okay but what about the second last digit?

12. Dec 24, 2014

### Raghav Gupta

Here I got that approach by binomial theorem.Perok why use pencil when pen is in demand.

13. Dec 24, 2014

I don't know. Are you preparing for iit or something?

14. Dec 24, 2014

### mafagafo

"I want to do it myself and possibly learn something" way:
$$27 ^ {27} = \left( 3^3 \right) ^ {27} = 3 ^ {81}$$
Now finish it. I find easier to work with a power of 3, you may think differently, though.

I provide two solutions below. I wouldn't peek if I were you, though.
Let $h$ be any integer such that $100 \mid h$.
Note that $h$ is not constant among the expressions below, the only constraints are those abovementioned.
$$27 ^ {27} = (25 + 2) ^ {27} = 25^{27} + 27 \cdot 25 ^ {26} \cdot 2 + \ldots + 2 ^ {27}$$
$$25^{27} + 27 \cdot 25 ^ {26} \cdot 2 + \ldots + 2 ^ {27} \equiv 25^{27} + 27 \cdot 25 ^ {26} \cdot 2 + 2 ^ {27} \mod 100$$
$$25^{27} + 27 \cdot 25 ^ {26} \cdot 2 + 2 ^ {27} = (25+h) + (27 \cdot 50) + (28 + h) = (25+h) + (50+h) + (28 + h) = 3+h \equiv 3 \mod 100$$
$$0 + 3 = 3$$
About $2^{27}$? Know your powers of 2.

I happen to know that $3 ^ {20 + x} \equiv 3 ^ x \mod 100$.
$27 ^ {27} = 3 ^ {81} = 3 ^ {(20 + (20 + (20 + (20 + 1))))} \equiv 3 ^ 1 \mod 100 = 3$
$0 + 3 = 3$

15. Dec 24, 2014

### Raghav Gupta

You are not getting it.I have figured what is the last digit already if you see above posts but not getting the second last digit of the number.I know 3 is the last digit.

16. Dec 24, 2014

### Raghav Gupta

Yeah,I am preparing for iit.It seems you also might be preparing?

17. Dec 24, 2014

### mafagafo

And the other digit is 0 (as both my solutions show). I do get it.

18. Dec 24, 2014

### Raghav Gupta

Sorry for a bit aggressiveness and not understanding you.I was seeing your spoiler of solving it gently and I don't get it.Why we are dividing by 100 and showing remainder like 3.Though we get remainder then it doesn't tells how we got second last digit as 0.Obviously then 0+3=3.

19. Dec 24, 2014

### mafagafo

Your English is so bad that I can't even understand if you are getting it or not. Add a space after your punctuation.
If the remainder of the division by 100 was 43 I would finish with 4 + 3 = 7.
As the remainder is 3, I end up with 0 + 3 = 3. Get it? It is modulo 100 and not modulo 10.

20. Dec 24, 2014

### Raghav Gupta

As in our high school modular arithmetic is not taught, I am not so acquainted with it. That is one reason for my language looking topsy-turvy. Are you crazy? Why it is looking to you that I am thinking modulo 10 and not modulo 100.