How many integers 1 ≤ a ≤ 2 0 1 5 are there such that a a a and a a end with the same digit?
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.
Very clear explanation! Thanks! (+1)
You are making good use of the fact that 0, 1, 5, and 6 are idempotents modulo 10.
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.
Nice solution
Problem Loading...
Note Loading...
Set Loading...
Cases mod 10.
If gcd ( a , 1 0 ) = 1 , then a is odd so a a ≡ a mod 4 and hence a a a ≡ a a mod 1 0 by Euler's Theorem.
If a ≡ 0 mod 1 0 then both sides are 0 mod 10. If a ≡ 5 then both sides are 5 mod 1 0 .
If a ≡ 4 or 6 mod 1 0 then both sides are 6 mod 1 0 .
So we're left with a ≡ ± 2 mod 1 0 . If 4 ∣ a then both sides are 6 mod 1 0 . So we're left with a ≡ 2 , 1 8 mod 2 0 . For these, the left side is 6 and the right side is 4 mod 1 0 .
Putting it all together, we have that a a a and a a end with the same digit if and only if a ≡ 2 , 1 8 mod 2 0 . There are 1 8 1 4 such a between 1 and 2 0 1 5 .