How to find a number $aabb$ that is a perfect square?

2.9k Views Asked by At

The number $aabb$ is

$$1000a + 100a + 10b + b = $$ $$1100a + 11b = $$ $$11 (100a + b) $$

To be a perfect square, each factor must appear an even number of times. Then $(100a + b)$ must be a multiple of $11$, which in this case is achieved by making that $a + b = 11$.

So, the possibles $a$ and $b$ are $9$ and $2$, $8$ and $3$, $7$ and $4$, $6$ and $5$, or the opposite order. But I don't know how to continue, because I am looking for an analytical way and not trying all possibilities to see which works.

3

There are 3 best solutions below

0
On BEST ANSWER

Since $b=11-a$, the number is $$11(100a+11-a)=11^2(9a+1)$$ so $9a+1$ is a perfect square. Also, $9a+1<83$. $9a+1=m^2$ yields $9a=(m+1)(m-1)$ and $m<10$. Since $m+1$ and $m-1$ can not be both multiples of $3$, then $m$ is $8$.

0
On

Rewrite it as $11(99a+(a+b)) = 121(9a+1)$, and it becomes pretty clear just from the identity $(x+1)(x-1)=(x^2-1)$ that you want $a=7, b=4$, and indeed $7744 = 88^2$

0
On

Note: After working this out for base 10, I looked at general base $m$ and found, as shown in the second half of this answer, that, in base $m\ge 5$, $a=m-3, b=4$ gives $(m+1)^2(m-3)^2 $. There may be other solutions, but there is always this one.

I worked this out in my head before writing anything down, so I'll ignore the previous answers that probably do the exact same thing.

$aabb = 1000a+100a+10b+b =1100a+11b =11(100a+b) $.

For this to be a square, it must be of the form $11^2n^2$, so $100a+b = 11n^2 $.

Since, mod 11, $100 = 99+1 = 1 $, $a+b = 0$. Since $0 \le a, b \le 9$, and ignoring the answer $a = b = 0$, we must have $a+b = 11$ so $b = 11-a$.

We must therefore have $100a+(11-a) =11n^2 $ or $9a+1 = n^2$ or $9a = n^2-1 =(n+1)(n-1) $. Since $a \le 9$, $n \le 9$.

$n+1$ and $n-1$ can not be both divisible by the same odd number so $n+1 = 9$ and $n = 8$.

This gives $a = 7, b=4$ so the number is $7744 = 11^2\,8^2$ which works.

Now I'll see what happens in an arbitrary base $m$, doing as much copy and paste as I can.

$aabb = m^3a+m^2a+mb+b =(m^3+m^2)a+(m+1)b =(m+1)(m^2a+b) $.

I'll assume that $m+1$ is prime, because lazy and messy. Let $m+1 = p$.

For this to be a square, it must be of the form $p^2n^2$, so $m^2a+b = pn^2 $.

Since, $\bmod p$, $m^2 = (p-1)^2 = 1 $, $a+b = 0$. Since $0 \le a, b \le m-1$, and ignoring the answer $a = b = 0$, we must have $a+b = p$ so $b = p-a$.

We must therefore have $m^2a+(m+1-a) =(m+1)n^2 $ or $(m^2-1)a+m+1 = (m+1)n^2$ or $(m-1)a+1 = n^2$ or $(m-1)a = n^2-1 =(n+1)(n-1) $. Since $a \le m-1$, $n \le m-1$.

One solution to this is $n+1 = m-1, n-1 = a$ so $n = m-2, a = m-3, b = m+1-a = 4 $, which gives, $m^2(m-3)+4 =(m+1)(m-2)^2 $ or

$\begin{array}\\ (m+1)(m-2)^2 &=m^2(m-3)+4\\ &=m^2(m+1-4)+4\\ &=m^2(m+1)-4(m^2-1)\\ &=m^2(m+1)-4(m+1)(m-1)\\ &=(m+1)(m^2-4m+4)\\ \end{array} $

which works.

Note that, in any base $m \ge 4$, $(m-3)(m-3)44 = (m+1)^2(m-2)^2 $.