Ms. Janet, you made a mistake!

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! .


The answer is 25.

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.

2 solutions

X X
Jun 23, 2018

Let the square number be n 2 n^2 .When n 50 n\le50 ,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 > 50 n>50 ,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 = 51 to 99 n=51 \text{ to }99 ),but from 2500 to 9999,there are 75 cases of the first two digits(25,26,27...98,99).Hence,there are 75 50 = 25 75-50=25 impossible first two digits of a four digit square number.

@XX Wonderful Solution. By the way, how do you get 75 possible first two digits? Is it by trial and error approach?

donglin loo - 2 years, 11 months ago

Log in to reply

The number of integers from 25 to 99 is 75

X X - 2 years, 11 months ago

Log in to reply

Oh okay I got it, thanks. Well delivered solution.

donglin loo - 2 years, 11 months ago
Donglin Loo
Jun 22, 2018

Relevant wiki: Modular Arithmetic

Note \textbf{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 = 3481 , 6 0 2 = 3600 59^2=3481,60^2=3600 , we see that 35 35 is "skipped" so 35 35 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 10 0 2 = 10000 100^2=10000 , 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: \textbf{Statement 1:} If ( 50 + x ) 2 p ( m o d 100 ) , t h e n x 2 p ( m o d 100 ) (50+x)^2\equiv p(mod100), then x^2\equiv p(mod100) for x Z x\in Z

Proof: \textbf{Proof:}

( 50 + x ) 2 p ( m o d 100 ) (50+x)^2\equiv p(mod100)

2500 + 100 x + x 2 p ( m o d 100 ) 2500+100x+x^2\equiv p(mod100)

x 2 p 2500 100 x ( m o d 100 ) x^2\equiv p-2500-100x(mod100)

x 2 p ( m o d 100 ) x^2\equiv p(mod100)

This completes the proof.

The converse of the statement is also true.

Statement 2: \textbf{Statement 2:} If x 2 p ( m o d 100 ) x^2\equiv p(mod100) , then ( 50 x ) 2 p ( m o d 100 ) (50-x)^2\equiv p(mod100) for x Z x\in 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 = 3481 , 6 0 2 = 3600 59^2=3481,60^2=3600 , 35 35 is skipped because 5 9 2 81 ( m o d 100 ) 59^2\equiv81(mod100) , 5 9 2 81 = 3400 59^2-81=3400 , 6 0 2 = 3600 60^2=3600 , 3600 3400 = 200 200 3600-3400=200\geq200 and so the 35 35 is skipped.

Now, we shall move on to the generalization.

If x 2 p ( m o d 100 ) x^2\equiv p(mod100) and ( x + 1 ) 2 ( x 2 p ) 200 (x+1)^2-(x^2-p)\geq200 , then there will be skipped two-digit numbers.

\Rightarrow If 2 x + 1 + p 200 2x+1+p\geq 200 , then there will be a skipped two-digit numbers.

Notice that x 50 x\geq 50 because p 99 p\leq99 and if x < 50 x 49 x<50\Rightarrow x\leq49 , 2 x + 1 99 2x+1\leq99

2 x + 1 + p 198 < 200 \Rightarrow 2x+1+p\leq198<200

However, we must also show that between each perfect squares, there will be at most 1 1 skipped two-digit number.

Proof: \textbf{Proof:} x 99 , p 99 x\leq99,p\leq99 , 2 x + 1 + p 2 ( 99 ) + 1 + 99 = 298 < 300 2x+1+p\leq 2(99)+1+99=298<300 , this completes the proof.

x 50 x\geq 50 , we can let x = 50 + y x=50+y

2 ( 50 + y ) + 1 + p 200 \Rightarrow 2(50+y)+1+p\geq200

100 + 2 y + 1 + p 200 100+2y+1+p\geq200

2 y + 1 + p 100 2y+1+p\geq100

50 x 99 50 50 + y 99 0 y 49 50\leq x\leq99 \Rightarrow 50\leq 50+y\leq99 \Rightarrow 0\leq y\leq49

( 50 + y ) 2 p ( m o d 100 ) y 2 p ( m o d 100 ) (50+y)^2\equiv p(mod100) \Rightarrow y^2\equiv p(mod100) ( Statement 1 \textbf{Statement 1} )

We will divide the numbers to be verified into several cases.

Generally speaking, if p 50 p\geq 50 , the value of y y is probably the valid solution we are looking for. However , there are some counter-examples too. For instance, when y = 13 , p = 69 y=13, p=69 , 2 y + 1 + p = 2 ( 13 ) + 1 + 69 = 96 < 100 2y+1+p=2(13)+1+69=96<100 and when y = 29 , p = 41 y=29, p=41 , 2 y + 1 + p = 2 ( 29 ) + 1 + 41 = 100 100 2y+1+p=2(29)+1+41=100\geq100 . In the later cases, you can observe that even when p < 50 p<50 , many of their corresponding values of y y are valid solutions. This is so because y y gets progressively larger to help fill the gap left by smaller p p . Also, the case where p 50 p\geq 50 but the corresponding value of y y is not valid solution will diminish in the later cases.

Case1: \textbf{Case1:} If 0 y 10 0\leq y\leq10 ,

After some verification,

we conclude that y = 9 y=9 is the solution in this case.

When y = 9 y=9 , 2 y + 1 + p = 2 ( 9 ) + 1 + 81 = 100 100 2y+1+p=2(9)+1+81=100\geq100

Case2: \textbf{Case2:} If 11 y 20 11\leq y\leq20 ,

After some verification,

we conclude that y = 14 , 17 , 19 y=14,17,19 are the solutions in this case.

When y = 14 y=14 , 2 y + 1 + p = 2 ( 14 ) + 1 + 96 100 2y+1+p=2(14)+1+96\geq100

When y = 17 y=17 , 2 y + 1 + p = 2 ( 17 ) + 1 + 89 100 2y+1+p=2(17)+1+89\geq100

When y = 19 y=19 , 2 y + 1 + p = 2 ( 19 ) + 1 + 61 100 2y+1+p=2(19)+1+61\geq100

Case3: \textbf{Case3:} If 21 y 30 21\leq y\leq30 ,

After some verification,

we conclude that y = 22 , 24 , 26 , 28 , 29 y=22,24,26,28,29 are the solutions in this case.

When y = 22 y=22 , 2 y + 1 + p = 2 ( 22 ) + 1 + 84 100 2y+1+p=2(22)+1+84\geq100

When y = 24 y=24 , 2 y + 1 + p = 2 ( 24 ) + 1 + 76 100 2y+1+p=2(24)+1+76\geq100

When y = 26 y=26 , 2 y + 1 + p = 2 ( 26 ) + 1 + 76 100 2y+1+p=2(26)+1+76\geq100

When y = 28 y=28 , 2 y + 1 + p = 2 ( 28 ) + 1 + 84 100 2y+1+p=2(28)+1+84\geq100

When y = 29 y=29 , 2 y + 1 + p = 2 ( 29 ) + 1 + 41 100 2y+1+p=2(29)+1+41\geq100

Case3: \textbf{Case3:} If 31 y 40 31\leq y\leq40 ,

Here, we can utilize Statement 2 \textbf{Statement 2} to further simplify our computations.

For example, when y = 34 , y 2 = 3 4 2 y=34, y^2=34^2 . 1 6 2 56 ( m o d 100 ) 16^2\equiv56(mod100) . Statement 2 \textbf{Statement 2} tells us that 3 4 2 = ( 50 16 ) 2 56 ( m o d 100 ) 34^2=(50-16)^2\equiv56(mod100)

After some verification,

we conclude that y = 31 , 32 , 34 , 36 , 37 , 38 , 39 y=31,32,34,36,37,38,39 are the solutions in this case.

When y = 31 y=31 , 2 y + 1 + p = 2 ( 31 ) + 1 + 61 100 2y+1+p=2(31)+1+61\geq100

When y = 33 y=33 , 2 y + 1 + p = 2 ( 33 ) + 1 + 89 100 2y+1+p=2(33)+1+89\geq100

When y = 34 y=34 , 2 y + 1 + p = 2 ( 34 ) + 1 + 56 100 2y+1+p=2(34)+1+56\geq100

When y = 36 y=36 , 2 y + 1 + p = 2 ( 36 ) + 1 + 96 100 2y+1+p=2(36)+1+96\geq100

When y = 37 y=37 , 2 y + 1 + p = 2 ( 37 ) + 1 + 69 100 2y+1+p=2(37)+1+69\geq100

When y = 38 y=38 , 2 y + 1 + p = 2 ( 38 ) + 1 + 44 100 2y+1+p=2(38)+1+44\geq100

When y = 39 y=39 , 2 y + 1 + p = 2 ( 39 ) + 1 + 21 100 2y+1+p=2(39)+1+21\geq100

Case3: \textbf{Case3:} If 31 y 40 31\leq y\leq40 ,

Similarly, here, we can utilize Statement 2 \textbf{Statement 2} to further simplify our computations.

After some verification,

we conclude that y = 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 y=41,42,43,44,45,46,47,48,49 are the solutions in this case.

When y = 41 y=41 , 2 y + 1 + p = 2 ( 41 ) + 1 + 81 100 2y+1+p=2(41)+1+81\geq100

When y = 42 y=42 , 2 y + 1 + p = 2 ( 42 ) + 1 + 64 100 2y+1+p=2(42)+1+64\geq100

When y = 43 y=43 , 2 y + 1 + p = 2 ( 43 ) + 1 + 49 100 2y+1+p=2(43)+1+49\geq100

When y = 44 y=44 , 2 y + 1 + p = 2 ( 44 ) + 1 + 36 100 2y+1+p=2(44)+1+36\geq100

When y = 45 y=45 , 2 y + 1 + p = 2 ( 45 ) + 1 + 25 100 2y+1+p=2(45)+1+25\geq100

When y = 46 y=46 , 2 y + 1 + p = 2 ( 46 ) + 1 + 16 100 2y+1+p=2(46)+1+16\geq100

When y = 47 y=47 , 2 y + 1 + p = 2 ( 47 ) + 1 + 9 100 2y+1+p=2(47)+1+9\geq100

When y = 48 y=48 , 2 y + 1 + p = 2 ( 48 ) + 1 + 4 100 2y+1+p=2(48)+1+4\geq100

When y = 49 y=49 , 2 y + 1 + p = 2 ( 49 ) + 1 + 1 100 2y+1+p=2(49)+1+1\geq100

So, the number of possible solutions = 1 + 3 + 5 + 7 + 9 = 25 =1+3+5+7+9=\boxed{25}

Whew! That was a pretty long solution.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...