Power Doesn't Change Last Digit?

How many integers 1 a 2015 1\leq{a}\leq{2015} are there such that a a a a^{a^a} and a a a^a end with the same digit?


The answer is 1814.

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.

1 solution

Patrick Corn
May 26, 2015

Cases mod 10.

If gcd ( a , 10 ) = 1 (a,10) = 1 , then a a is odd so a a a a^a \equiv a mod 4 4 and hence a a a a a a^{a^a} \equiv a^a mod 10 10 by Euler's Theorem.

If a 0 a \equiv 0 mod 10 10 then both sides are 0 0 mod 10. If a 5 a \equiv 5 then both sides are 5 5 mod 10 10 .

If a 4 a \equiv 4 or 6 6 mod 10 10 then both sides are 6 6 mod 10 10 .

So we're left with a ± 2 a \equiv \pm 2 mod 10 10 . If 4 a 4|a then both sides are 6 6 mod 10 10 . So we're left with a 2 , 18 a \equiv 2, 18 mod 20 20 . For these, the left side is 6 6 and the right side is 4 4 mod 10 10 .

Putting it all together, we have that a a a a^{a^a} and a a a^a end with the same digit if and only if a ≢ 2 , 18 a \not\equiv 2,18 mod 20 20 . There are 1814 \fbox{1814} such a a between 1 1 and 2015 2015 .

Very clear explanation! Thanks! (+1)

You are making good use of the fact that 0, 1, 5, and 6 are idempotents modulo 10.

Otto Bretscher - 6 years ago

Log in to reply

what about 3^3 and 3^3^3 .they have 7 and 3 as last digits respectively . i am getting 1410 since numbers having 0 , 1,4.5,6,8,9 as last digit are satisfying this comparision.

Rajarsh Bais - 6 years ago

Log in to reply

3 3 3 = 3 27 = 7625597484987 3^{3^3} = 3^{27} = 7625597484987 .

Patrick Corn - 6 years ago

Nice solution

Hans Gabriel Daduya - 3 years, 6 months ago

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...