# Find the four digit number with perfect square

Find the four digit number

1. whose first two digit is a perfect square
2. and second two digit is a perfect square
3. and the 4 digit number itself is a perfect square

for ex:

if the number is "abcd" then

"ab" is a perfect square

"cd" is a perfect square

"abcd" is also a perfect square

what is the number? how to find it easily?

Edited

i need a algebra solution.

• You should probably say "last two" instead of "second two" [digits]. I thought "second two" meant $bc$ instead of $cd$. Sep 28 '17 at 14:11

The number is 1681. It could only be one of a few numbers starting either 16cd, 25cd, 36cd etc. Then I just squared a few numbers until i could see the cd was a square number.
Further, the number cannot be > 2500, since 50^2 = 2500, and 51^2 = 2601, so there would not be a cd other than '00' following 25cd, 36cd etc

• Because the question uses concatanation, I don't think an alebraic proof would be possible as the archimedean property cannot be applied. Sep 28 '17 at 13:56
• How about $1600$? Sep 28 '17 at 14:16
• Geometrically 00 is not really a square number as 0 is not a natural number. If we do include 00, then 2500, 3600, 4900 etc can all be included as answers Sep 28 '17 at 14:25
• Some conventions include $0$ among the natural numbers; number theoretically speaking, it's certainly a perfect square. In any event, it's a minor point. Sep 28 '17 at 14:33

Let the number is $\overline{abcd}$. So you have $\overline{ab} = k^2$, $\overline{cd} = l^2$ and $\overline{abcd} = m^2$, where $0\leq k,l \leq 9$.

One then has $$m^2 = 100k^2 + l^2.$$

Then $$2^25^2k^2 = (m-l)(m+l).$$

Note that $m-l$ and $m+l$ are even.

Case 1: $m+l = m-l = 10k$. Then $l=0$, and the number which you want to find are $1600$, $2500$, $3600$, $\dots$, $8100$.

Case 2: $m+l = 50$ and $m-l=2k^2$, then $2l = 50-2k^2$, or $l=25-k^2$, note that $0\leq l \leq 9$, so $k=4$ and $l=9$. So, the number is $1681$.

• I can't understand this line , pls explain 2252k2=(m−l)(m+l) Sep 28 '17 at 18:30

Why not just brute-force it? The problem is a pretty opaque and unnatural to begin with.

>>> min([i for i in range(1000,10000) if (i**0.5).is_integer() and (i/100)**0.5).is_integer() and ((i%100)**0.5).is_integer()]) 1600

Unmin-ed version:

>>> [i for i in range(1000,10000) if (i**0.5).is_integer() and ((i/100)**0.5).is_integer() and ((i%100)**0.5).is_integer()] [1600, 1681, 2500, 3600, 4900, 6400, 8100]