Ms. Janet told her class that she was going to write down a four-digit perfect square.
She started by writing down the first digit on the blackboard. As soon as she wrote down the second digit, Jerry, the math whizz in the class raised his hand and said,
"Ms. Janet, you made a mistake!"
After checking what she had written down, Ms. Janet realized her mistake. She erased everything and wrote down the correct four-digit perfect square.
How many two-digit numbers could make up the first two digits written down by Ms. Janet at the very beginning?
Inspired by this problem .
This is part of the set Things Get Harder! .
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.
@XX Wonderful Solution. By the way, how do you get 75 possible first two digits? Is it by trial and error approach?
Log in to reply
The number of integers from 25 to 99 is 75
Log in to reply
Oh okay I got it, thanks. Well delivered solution.
Relevant wiki: Modular Arithmetic
Note My solution is pretty long. If you don't feel like going through mine, you can just read @XX solution as his is short, sweet and complete, which I give full credits to.
Jerry knew Ms. Janet made a mistake as soon as she wrote down the second digit because the square of a positive integer which goes up to four-digit could not yield the concatenation of the first two digits written down.
For example, 5 9 2 = 3 4 8 1 , 6 0 2 = 3 6 0 0 , we see that 3 5 is "skipped" so 3 5 may be the concatenation of the first two digits written down.
But it would be pretty tedious if we compute the square of all positive two-digit numbers(since 1 0 0 2 = 1 0 0 0 0 , which is the smallest five-digit positive integers) and see which two-digit numbers are skipped. So, is there a better way than that? The answer is yes and no computer programming is needed. (Although you can solve this with coding)
But before that, we will have to prove some useful statements.
Statement 1: If ( 5 0 + x ) 2 ≡ p ( m o d 1 0 0 ) , t h e n x 2 ≡ p ( m o d 1 0 0 ) for x ∈ Z
Proof:
( 5 0 + x ) 2 ≡ p ( m o d 1 0 0 )
2 5 0 0 + 1 0 0 x + x 2 ≡ p ( m o d 1 0 0 )
x 2 ≡ p − 2 5 0 0 − 1 0 0 x ( m o d 1 0 0 )
x 2 ≡ p ( m o d 1 0 0 )
This completes the proof.
The converse of the statement is also true.
Statement 2: If x 2 ≡ p ( m o d 1 0 0 ) , then ( 5 0 − x ) 2 ≡ p ( m o d 1 0 0 ) for x ∈ Z
The proof is similiar to the first one, so I will skip the proof.
Now, we shall go deeper into reasoning of why some of the two-digit numbers are skipped. For example, we see that 5 9 2 = 3 4 8 1 , 6 0 2 = 3 6 0 0 , 3 5 is skipped because 5 9 2 ≡ 8 1 ( m o d 1 0 0 ) , 5 9 2 − 8 1 = 3 4 0 0 , 6 0 2 = 3 6 0 0 , 3 6 0 0 − 3 4 0 0 = 2 0 0 ≥ 2 0 0 and so the 3 5 is skipped.
Now, we shall move on to the generalization.
If x 2 ≡ p ( m o d 1 0 0 ) and ( x + 1 ) 2 − ( x 2 − p ) ≥ 2 0 0 , then there will be skipped two-digit numbers.
⇒ If 2 x + 1 + p ≥ 2 0 0 , then there will be a skipped two-digit numbers.
Notice that x ≥ 5 0 because p ≤ 9 9 and if x < 5 0 ⇒ x ≤ 4 9 , 2 x + 1 ≤ 9 9
⇒ 2 x + 1 + p ≤ 1 9 8 < 2 0 0
However, we must also show that between each perfect squares, there will be at most 1 skipped two-digit number.
Proof: x ≤ 9 9 , p ≤ 9 9 , 2 x + 1 + p ≤ 2 ( 9 9 ) + 1 + 9 9 = 2 9 8 < 3 0 0 , this completes the proof.
x ≥ 5 0 , we can let x = 5 0 + y
⇒ 2 ( 5 0 + y ) + 1 + p ≥ 2 0 0
1 0 0 + 2 y + 1 + p ≥ 2 0 0
2 y + 1 + p ≥ 1 0 0
5 0 ≤ x ≤ 9 9 ⇒ 5 0 ≤ 5 0 + y ≤ 9 9 ⇒ 0 ≤ y ≤ 4 9
( 5 0 + y ) 2 ≡ p ( m o d 1 0 0 ) ⇒ y 2 ≡ p ( m o d 1 0 0 ) ( Statement 1 )
We will divide the numbers to be verified into several cases.
Generally speaking, if p ≥ 5 0 , the value of y is probably the valid solution we are looking for. However , there are some counter-examples too. For instance, when y = 1 3 , p = 6 9 , 2 y + 1 + p = 2 ( 1 3 ) + 1 + 6 9 = 9 6 < 1 0 0 and when y = 2 9 , p = 4 1 , 2 y + 1 + p = 2 ( 2 9 ) + 1 + 4 1 = 1 0 0 ≥ 1 0 0 . In the later cases, you can observe that even when p < 5 0 , many of their corresponding values of y are valid solutions. This is so because y gets progressively larger to help fill the gap left by smaller p . Also, the case where p ≥ 5 0 but the corresponding value of y is not valid solution will diminish in the later cases.
Case1: If 0 ≤ y ≤ 1 0 ,
After some verification,
we conclude that y = 9 is the solution in this case.
When y = 9 , 2 y + 1 + p = 2 ( 9 ) + 1 + 8 1 = 1 0 0 ≥ 1 0 0
Case2: If 1 1 ≤ y ≤ 2 0 ,
After some verification,
we conclude that y = 1 4 , 1 7 , 1 9 are the solutions in this case.
When y = 1 4 , 2 y + 1 + p = 2 ( 1 4 ) + 1 + 9 6 ≥ 1 0 0
When y = 1 7 , 2 y + 1 + p = 2 ( 1 7 ) + 1 + 8 9 ≥ 1 0 0
When y = 1 9 , 2 y + 1 + p = 2 ( 1 9 ) + 1 + 6 1 ≥ 1 0 0
Case3: If 2 1 ≤ y ≤ 3 0 ,
After some verification,
we conclude that y = 2 2 , 2 4 , 2 6 , 2 8 , 2 9 are the solutions in this case.
When y = 2 2 , 2 y + 1 + p = 2 ( 2 2 ) + 1 + 8 4 ≥ 1 0 0
When y = 2 4 , 2 y + 1 + p = 2 ( 2 4 ) + 1 + 7 6 ≥ 1 0 0
When y = 2 6 , 2 y + 1 + p = 2 ( 2 6 ) + 1 + 7 6 ≥ 1 0 0
When y = 2 8 , 2 y + 1 + p = 2 ( 2 8 ) + 1 + 8 4 ≥ 1 0 0
When y = 2 9 , 2 y + 1 + p = 2 ( 2 9 ) + 1 + 4 1 ≥ 1 0 0
Case3: If 3 1 ≤ y ≤ 4 0 ,
Here, we can utilize Statement 2 to further simplify our computations.
For example, when y = 3 4 , y 2 = 3 4 2 . 1 6 2 ≡ 5 6 ( m o d 1 0 0 ) . Statement 2 tells us that 3 4 2 = ( 5 0 − 1 6 ) 2 ≡ 5 6 ( m o d 1 0 0 )
After some verification,
we conclude that y = 3 1 , 3 2 , 3 4 , 3 6 , 3 7 , 3 8 , 3 9 are the solutions in this case.
When y = 3 1 , 2 y + 1 + p = 2 ( 3 1 ) + 1 + 6 1 ≥ 1 0 0
When y = 3 3 , 2 y + 1 + p = 2 ( 3 3 ) + 1 + 8 9 ≥ 1 0 0
When y = 3 4 , 2 y + 1 + p = 2 ( 3 4 ) + 1 + 5 6 ≥ 1 0 0
When y = 3 6 , 2 y + 1 + p = 2 ( 3 6 ) + 1 + 9 6 ≥ 1 0 0
When y = 3 7 , 2 y + 1 + p = 2 ( 3 7 ) + 1 + 6 9 ≥ 1 0 0
When y = 3 8 , 2 y + 1 + p = 2 ( 3 8 ) + 1 + 4 4 ≥ 1 0 0
When y = 3 9 , 2 y + 1 + p = 2 ( 3 9 ) + 1 + 2 1 ≥ 1 0 0
Case3: If 3 1 ≤ y ≤ 4 0 ,
Similarly, here, we can utilize Statement 2 to further simplify our computations.
After some verification,
we conclude that y = 4 1 , 4 2 , 4 3 , 4 4 , 4 5 , 4 6 , 4 7 , 4 8 , 4 9 are the solutions in this case.
When y = 4 1 , 2 y + 1 + p = 2 ( 4 1 ) + 1 + 8 1 ≥ 1 0 0
When y = 4 2 , 2 y + 1 + p = 2 ( 4 2 ) + 1 + 6 4 ≥ 1 0 0
When y = 4 3 , 2 y + 1 + p = 2 ( 4 3 ) + 1 + 4 9 ≥ 1 0 0
When y = 4 4 , 2 y + 1 + p = 2 ( 4 4 ) + 1 + 3 6 ≥ 1 0 0
When y = 4 5 , 2 y + 1 + p = 2 ( 4 5 ) + 1 + 2 5 ≥ 1 0 0
When y = 4 6 , 2 y + 1 + p = 2 ( 4 6 ) + 1 + 1 6 ≥ 1 0 0
When y = 4 7 , 2 y + 1 + p = 2 ( 4 7 ) + 1 + 9 ≥ 1 0 0
When y = 4 8 , 2 y + 1 + p = 2 ( 4 8 ) + 1 + 4 ≥ 1 0 0
When y = 4 9 , 2 y + 1 + p = 2 ( 4 9 ) + 1 + 1 ≥ 1 0 0
So, the number of possible solutions = 1 + 3 + 5 + 7 + 9 = 2 5
Whew! That was a pretty long solution.
Problem Loading...
Note Loading...
Set Loading...
Let the square number be n 2 .When n ≤ 5 0 ,the difference of two adjacent square numbers is not larger than 100,so the integers from 10 to 25 are all possible first two digits.
When n > 5 0 ,the difference of two adjacent square numbers is larger than 100,so no two square numbers larger than 2500 have the same first two digits.
There are only 50 square numbers from 2500 to 9999( n = 5 1 to 9 9 ),but from 2500 to 9999,there are 75 cases of the first two digits(25,26,27...98,99).Hence,there are 7 5 − 5 0 = 2 5 impossible first two digits of a four digit square number.