Consider all 2 digit numbers N such that the last 2 digits of N 2 are N itself. What is the sum of all these 2 digit numbers?
Details and assumptions
The number 1 2 = 0 1 2 is a 2-digit number, not a 3-digit number.
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.
This solution actually uses the Chinese Remainder Theorem, since we know that remainders of N or N − 1 taken modulo 25 and 4. In fact, we may easily use a similar method to find k − digit numbers N such that the last 2 digits of N 2 are N itself. Furthermore, for fixed k , do you know what the sum of all such numbers are?
Let N be 10X+Y , where X and Y represent the two digits of N . The units digit of N^2 is only affected by Y, the units digit of N. In other words, Y 2 ≡ Y ( m o d 1 0 ) This is only true for three digits: 1, 5 and 6. We can deal with each case separately. When Y is 1, N 2 = ( 1 0 X + 1 ) 2 = 1 0 0 X 2 + 2 0 X + 1 Rearranging in order to see multiples of 100, 10, and 1 will make the values of the digits clearer: 1 0 0 ( X 2 ) + 1 0 ( 2 X ) + ( 1 ) The first term is a multiple of 100, and therefore it will not affect anything less than the hundreds digit. Since the second term is a multiple of 10, it will affect the tens digit (and possibly the hundreds digit as well, but that is irrelevant to the question asked). We want the tens digit to be X, which means 2 X ≡ X ( m o d 1 0 ) There is no solution to this statement, so Y cannot equal 1. Let's look at the second case, where Y=5: ( 1 0 X + 5 ) 2 = 1 0 0 X 2 + 1 0 0 X + 2 5 1 0 0 ( X 2 + X ) + 1 0 ( 2 ) + 5 The 10(2) term shows that the tens digit must be 2, regardless of the value of X. To satisfy the conditions for N, this means that X must be 2. This gives us 25 as a value of N. For the third case, when Y=6, ( 1 0 X + 6 ) 2 = 1 0 0 X 2 + 1 2 0 X + 3 6 1 0 0 ( X 2 + X ) + 1 0 ( 2 X + 3 ) + 6 Like in the first case, modulo arithmetic can be used to write an equation for the tens digit: 2 X + 3 ≡ X ( m o d 1 0 ) X ≡ − 3 ≡ 7 ( m o d 1 0 ) Therefore, when Y=6, X must be 7, giving us 76 as a value for N. All three possible cases were covered, resulting in 2 possible values for N. Adding those two values of N together, we get the answer: 2 5 + 7 6 = 1 0 1
The number has to end in either 0,1,5, or 6, since those are the only number s when squared are congruent mod 10 (or have the same last digit). We can toss out zero because then the square would end in two zeros which would mean that the original number was 0. Working mod 100, express the two digit number xy as 10x+y. Its square mod 100 is 20x y+y^2. You want to find all (x,y) such that 20x y+y^2 is congruent to 10x+y mod 100. Substituting y=1, y=5,y=6 gives you that the only possible solutions are (x,y)=(2,5), (7,6), so the sum is 25+76=101.
$$\text{Firstly, as the last digits are the same} N^2 \equiv N \pmod{10}$$ $$N^2-N=N(N-1) \equiv 0 \pmod{10}$$ $$\text{Prime factorisation of 10 is } 2 \times 5$$ $$N(N-1)\text{ is clearly even so it is only required that } N(N-1) \equiv 0 \pmod{5}$$ $$\Rightarrow N \equiv 0,1 \pmod{5}$$ $$\Rightarrow N = 10k+1,10k+5,10k+6 \text{ where } k<10 \text{ as N is 2-digit}$$
$$\text{Case 1: } N=10k+1$$ $$(10k+1)^2 \equiv 10k+1 \pmod{100}$$ $$100k^2 + 20k + 1 \equiv 10k + 1 \pmod{100}$$ $$10k \equiv 0 \pmod{100} \text{ which is clearly impossible if }k<10$$
$$\text{Case 2: } N=10k+5$$ $$(10k+5)^2 \equiv 10k+5 \pmod{100}$$ $$100k^2 + 100k + 25 \equiv 10k + 5 \pmod{100}$$ $$25 \equiv 10k+5 \equiv N \pmod{100} \Rightarrow N = 25$$
$$\text{Case 3: } N=10k+6$$ $$(10k+6)^2 \equiv 10k+6 \pmod{100}$$ $$100k^2 + 120k + 36 \equiv 10k + 6 \pmod{100}$$ $$10k + 30 \equiv 0 \equiv N \pmod{100} \Rightarrow k = (100-30)/10 = 7\text{ and }N = 10(7) + 6 = 76$$
Therefore, total is 76+25 = 101
Any 2 digit number is of the form 1 0 a + b , where a and b are its tens and units digits respectively.
Now for the last 2 digits of the number's square to be equal to the number, the last digit definitely has to be equal.
Only numbers ending with 1, 5, 6, and 9 exhibit this property.
So we have limited our search to only 40 numbers from 90.
Now let us try further.
If ( 1 0 a + b ) 2 m o d 1 0 0 = 1 0 a + b , then ( 1 0 0 a 2 + 2 0 a b + b 2 ) m o d 1 0 0 = 1 0 a + b
Now whatever out first digit ( a ) is, 1 0 0 a will never affect the first 2 digits.
So we are left with ( 2 0 a b + b 2 ) m o d 1 0 0 = 1 0 a + b
Now we substitute b = 1 , to get ( 2 0 a + 1 ) m o d 1 0 0 = 1 0 a + 1 , or ( 2 0 a ) m o d 1 0 0 = 1 0 a
Clearly, no value of a suffices the above condition.
Now we come to the case with b = 5 . The condition to be satisfied is ( 1 0 0 a + 2 5 ) m o d 1 0 0 = 1 0 a + 5 ⇒ 2 5 = 1 0 a + 5 ⇒ a = 2 (again, for all values of a , 1 0 0 a won't affect the last 2 digits)
So we have 2 5 as one possible solution.
Now consider the case where units digit is 6 . ( 1 2 0 a + 3 6 ) m o d 1 0 0 = 1 0 a + 6 ⇒ 1 2 0 a m o d 1 0 0 + 3 0 = 1 0 a We start checking from a = 4 , and find that a = 7 satisfies.
So we set 7 6 as another solution.
Now similarly, we check by setting a = 9 , and find that no numbers satisfy.
So the answer is 2 5 + 7 6 = 1 0 1
Since the last 2 digits of N 2 are N = a b , then the last 2 digits of N 2 − N are 0 0 , so 100 divides N 2 − N = N ( N − 1 ) . Since g cd ( N , N − 1 ) = 1 , both terms cannot be divisible by 2 or 5 at the same time. As such, we must have N ≡ 0 ( m o d 4 ) , N ≡ 1 ( m o d 2 5 ) or N ≡ 1 ( m o d 4 ) , N ≡ 0 ( m o d 2 5 ) or N ≡ 0 ( m o d 1 0 0 ) or N ≡ 1 ( m o d 1 0 0 ) .
Case 1: N ≡ 0 ( m o d 4 ) , N ≡ 1 ( m o d 2 5 ) . This has the unique solution N ≡ 7 6 ( m o d 1 0 0 ) .
Case 2: N ≡ 1 ( m o d 4 ) , N ≡ 0 ( m o d 2 5 ) . This has the unique solution N ≡ 2 5 ( m o d 1 0 0 ) .
Case 3: N ≡ 0 ( m o d 1 0 0 ) . This has no solution that has 2 digits.
Case 4: N ≡ 1 ( m o d 1 0 0 ) . This has no solution that has 2 digits.
Hence, the sum of all 2 digit numbers are 7 6 + 2 5 = 1 0 1 .
Problem Loading...
Note Loading...
Set Loading...
According to assumption, N 2 − N = N ( N − 1 ) has the last two digits equally zero, hence is divisible by 100. Since N and N − 1 are coprime, it follows that one of them must be divisible by 25, and one of them must be divisible by 4. We consider the following cases:
Case 1: N is a multiple of 25 and 4. This has no 2-digit solution.
Case 2: N is a multiple of 25, N − 1 is a multiple of 4. The solution is N = 2 5 .
Case 3: N is a multiple of 4, N − 1 is a multiple of 25. The solution is N = 7 6 .
Case 4: N − 1 is a multiple of 25 and 4. This has no 2-digit solution.
Hence, the answer is 101.