9

If we reverse the digits of $12$ we will get $21$. $12^{2}=144$. If we reverse its digits we will get $441$ which is $21^{2}$.

Here is the puzzle. How many such two digit numbers are there? Digits must be different.

We got an algebraic method to solve it if the square is a three digit number.It given here :

Let $a>b$ $(10a+b)^{2}=100x+10y+z$ and $(10b+a)^{2}=100z+10y+x$

Difference between these two equations will lead to $a^{2}-b^{2}=x-z$

$x-z \leq 8$.Then $a^{2}-b^{2} \leq 8$.

Since squares are of three digits $a <4$.But since $a>b ,a \neq 1$.

$b=1 \Longrightarrow a^{2} \leq 9$.Then $a=1,2,3$ but only possibilities are $2 $ and $3$.

$b=2 \Longrightarrow a^{2} \leq 12 \Longrightarrow a= 1,2,3$. But possibility is $a=3$. So next such pair will be $13,31$. Higher values of $b$ will not work since $a$ cannot exceed 3. This is an explanation we obtained from a mathematics group.It works well if the square is a three digit number.What will happen if square is a 4 digit number... Or if we try to extend this problem for numbers having more than two digits ?

Stefan4024
  • 36,461
Madhu
  • 1,813
  • Without using algebra we can arrive at this result..since square is a three digit number $ a,b \leq 3$ moreover they are distinct.And if we assume $a>b$ options are 31,32,21$ now one can square and arrive at answer. – Madhu Mar 06 '15 at 02:00

3 Answers3

3

In response to your question: while there are many solutions where the squares have an odd number of digits, there are none for squares with an even number of digits such as 4.

Proof: Let $n \neq r$ be the number and its reverse, and let $10^{2k+1} < n^2 \neq r^2 < 10^{2k+2}$. Then $r^2$ ends with 1, 2, 5, 6 or 9 (not a 0, since then $n$ would start with 0). However, if $r^2$ ends with 1 then $n^2$ must start with 1, meaning $3.16 \times 10^{k} < n < 4.47 \times 10^{k}$; hence $n$ must start with either 3 or 4; but then $r^2$ ends with 9 or 6, a contradiction. By the same logic, if $r^2$ ends with 2 then $n$ starts with 4 or 5, meaning $r^2$ ends with 6 or 5. If $r^2$ ends with 5, $n$ starts with 7. If $r^2$ ends with 6, $n$ starts with 7 or 8. And if $r^2$ ends with 9, $n$ starts with 9. Since none of these are possible, no solution exists.

@tong_nor's answer demonstrates an infinite sequence of examples where the squares have an odd number of digits. In fact, there are many other such examples. A quick Python script suggests that all the the digits of the roots are always in the range 0 to 3. Proving this may be a good follow uo question.

2

the number of such examples is infinite, because we have the following sequence:

$12^2=144$

$102^2=10404$

$1002^2=1004004$

$10002^2=100040004$

$\dots\ \dots\ \dots$

and the same with digits reversed:

$21^2=441$

$201^2=40401$

$2001^2=4004001$

$20001^2=400040001$

$\dots\ \dots\ \dots$

tong_nor
  • 4,024
  • 16
  • 27
  • Two questions I need answer...one.Is there any other two digit numbers with these property whose square is a four digit number...secondly for problem one and for numbers having more than two digits How can we arrive at an answer by using algebra or logic... – Madhu Mar 11 '15 at 17:01
0

if we try to extend this problem for numbers having more than two digits

Let's generalise to any base $b$. Any number $c$, for some $n$, can be written in base $b$ as:

$$ \sum_{i=0}^n a_i b^i $$

Where $a_n \neq 0$.

We can then define the reversing function $f_b(c)$ (for the same $c$) as:

$$ \sum_{i=0}^n a_i b^{n - i} $$

Note, this admits $f_{10}(100) = 1$.

Then we can ask, given a $b$, for what $x$ does this equation hold:

$$ f_b(x)^2 = f_b(x^2) $$

As tong_nor notes, the sequence of such $x$ is infinite for $b=10$. What about in general for $b$?

Well, consider any number $x$ written as:

$$ \sum_{i=0}^n a_i b^i $$

Squaring it gets:

$$ \sum_{i=0}^{2n} (\sum_{j + k = i} a_ja_k) b^i $$

Note: the inner sum is over all combinations of natural numbers $0 \leq j, k \leq n$ with $j + k = i$.

If for all $i$:

$$ \sum_{j + k = i} a_ja_k < b $$

Then:

$$ f_b(x^2) = \sum_{i=0}^{2n} (\sum_{j + k = i} a_ja_k) b^{2n - i} $$

Now, we also have:

$$ f_b(x) = \sum_{i=0}^n a_i b^{n - i} $$

And squaring this gives:

$$ f_b(x)^2 = \sum_{i=0}^{2n} (\sum_{j + k = i} a_ja_k) b^{2n - i} $$

So a sufficient condition for this equation to hold is:

$$ \sum_{j + k = i} a_ja_k < b $$

For all $0 < i < 2n$.

This can always be achieved, for example, by an infinite number of numbers $x_n$ for any $b > 3$, by simply taking:

$$ x_n = b^n + 1 $$

Future work would be to prove necessary conditions and generalise squares and square roots to powers and roots of any integer $p$.

Colm Bhandal
  • 4,897