91

So my 7 year old son pointed out to me something neat about the number 12: if you multiply it by itself, the result is the same as if you took 12 backwards multiplied by itself, then flipped the result backwards. In other words: $$12 × 12 = 144$$$$21 × 21 = 441$$

I confidently explained to him that this was merely a coincidence.

But he then casually pointed out that the same holds true for 10, 11 and 13 (as long as you use leading zeros), $$10 × 10 = 100$$$$01 × 01 = 001$$

As if this wasn't enough, he also went on to mention that the same holds true for addition for those same four numbers! $$12 + 12 = 24$$ $$21+21 = 42$$

So needless to say, this is hard to chalk up to mere coincidence. Is there some non-coincidental reason for these strange findings?

Bill Dubuque
  • 257,588
  • 37
  • 262
  • 861
BCA
  • 753
  • 5
  • 7
  • 34
    Just means there is no carrying. Works for $13$ as well ($13\times 13=169, 31\times 31=961$) or for $102$, say, but not $14$. because $4\times4=16$ would need carrying. – lulu Mar 11 '17 at 01:09
  • 7
    ... although $14$ works for addition, as does any number where both digits are less than $5$, – Joffan Mar 11 '17 at 01:11
  • Maybe it is required that the sum of the ciphers of the number is no bigger than 5. Maybe it works also for 20, 22, 30 and 40... – Carlos Toscano-Ochoa Mar 11 '17 at 01:12
  • https://en.wikipedia.org/wiki/Positional_notation – user76568 Mar 11 '17 at 01:16
  • 3
    Also works for $12\times 14=168$ and $41\times 21=861$, or $11\times 15=165$ or $11\times 18=198, 11\times 81=891$. – Thomas Andrews Mar 11 '17 at 01:18
  • 2
    Basically, any multiplication where there is no "carrying" works. – Thomas Andrews Mar 11 '17 at 01:19
  • 28
    Your son has rediscovered the "skinny numbers": https://oeis.org/A061909 – Michael Lugo Mar 11 '17 at 01:41
  • 12
    Upvoting for the seven year old. – Joshua Mar 11 '17 at 02:38
  • I came across the same coincidence when i was 16 and trying to avoid math homework. I used to think these are the only numbers with that property, until I wrote a computer program to find more. And more it did indeed find. – Asaf Karagila Mar 12 '17 at 04:00
  • All of the answers below assume that the number base is ten. But your son's examples work with number base eleven, twelve, and up, but not in number base 9 and lower. Suggest limiting the problem by specifying the number base. – richard1941 Mar 14 '17 at 22:09

5 Answers5

53

Suppose we have a 2 digit number $x$. We can write is in terms of its digits $a$ and $b$. When we attempt to square this number, we get an interesting result.

$$x^2=(10a+b)^2=100a^2+10(2ab)+b^2$$

We can also flip the digits (I'll use $\bar x$ to indicate this) and then square.

$$\bar x^2=(10b+a)^2=100b^2+10(2ab)+a^2$$

This result isn't very useful on its own, but if $a^2$, $b^2$, and $2ab$ are all less than $10$, then the three terms above are the three digits of $x^2$ and $\bar x^2$ respectively. It is clear from that that reversing the digits of $x$ reverses the digits of $x^2$ provided it meets those requirements. (If we switch $a$ and $b$, the first and last terms switch while the middle term is unchanged.)

Note that $10$, $11$, $12$, and $13$ (as well as $20$, $21$, $22$, $30$, and $31$) all satisfy the same condition $a^2,b^2,2ab<10$ and thus have the property you describe.

The same argument can be used for addition, since, if no digit is greater than $4$, we can add the digits individually. Rearranging the digits of such a number will apply the same rearrangement to its sum with itself.

We can play the same game with three digit numbers, but the restrictions are even greater:

$$x^2=(100a+10b+c)^2=10000a^2+1000(2ab)+100(b^2+2ac)+10(2bc)+c^2$$

If each factor multiplying a power of ten is less than ten, we have the same property. This gives us a few numbers, which you can verify all have the property.

$$100,101,102,103,110,111,112,113,120,121,122,130,200,201,202,210,211,212,220,300,301,310,311$$

Note that we have not shown that these conditions give you all the numbers for which $\bar x^2=\bar{x^2}$, though I haven't been able to find a counterexample. This argument nonetheless applies to all of the numbers you provided.

Jason C
  • 169
  • 13
Kajelad
  • 13,139
  • 1
  • 12
  • 31
  • Palindromic numbers own – user76568 Mar 11 '17 at 01:50
  • 1
    Related: http://math.stackexchange.com/questions/1633311/prove-that-the-number-14641-is-the-fourth-power-of-an-integer-in-any-base-greate – Ethan Bolker Mar 11 '17 at 01:56
  • 1
    "Note that these conditions do not give you all the numbers for which $\overline{x}^2=\overline{x^2}$, but this argument applies to all the numbers you mention. Palindromic numbers are a natural choice for a counterexample." What do you mean by this? It seems to me that palindromes usually don't work. For example, $191^2 = 36481$, which isn't a palindrome. (Also, did you mean to include "400" in your list?) – A. Rex Mar 11 '17 at 05:27
  • @A.Rex Thanks for pointing that out. I've corrected the errors. It appears there are in fact no counterexamples less than 10000. – Kajelad Mar 11 '17 at 08:40
  • 1
    $2a+2b$ should be $2ab$. – Litho Mar 11 '17 at 17:04
  • Note that ​ "no counterexamples less than 10000" ​ is only when we don't allow leading zeros. ​ ​ ​ (Otherwise, 1000 is a counterexample.) ​ ​ ​ ​ ​ ​ ​ ​ –  Mar 12 '17 at 01:47
  • It was my understanding from the question that leading zeros are fine, tough it is worth noting that the we need to specify how they are treated, e. g. $1=01=001$. – Kajelad Mar 12 '17 at 01:52
  • Oh - I now realize that you're referring to counterexamples to "the equality implies that there are no carries", rather than to "the equality is false". ​ ​ ​ ​ –  Mar 12 '17 at 02:03
  • http://math.stackexchange.com/q/2185771/19328 asks about counterexamples. – A. Rex Mar 14 '17 at 04:05
32

Let's start with addition. In a positional system like the one we ordinarily use, when we add two numbers, digits of different weights interact through carries. If there are no carries out of any positions, the sum may be performed on each pair of digits independently and then the overall result assembled from those partial results by just arranging them in the right order. For $0 \leq i < 5$, we have $2i < 10$; hence if all digits of a number are less than $5$ the addition trick will work.

The multiplication trick is similar. For instance, $$112 \cdot 112 = 11200 + 01120 + 00224 = 12544 \enspace,$$ while $$211 \cdot 211 = 42200 + 02110 + 00211 = 44521 \enspace.$$ Note that there are no carries generated, either while computing the partial products or while computing the final sum.

While the condition $0 \leq i < 5$ works for any numbers of digits when computing $n+n$, the increase in the number of partial products means that the multiplication trick only works for relatively small numbers. For instance,

$$ 11111112 \cdot 11111112 = 123456809876544 \enspace,$$

but

$$ 21111111 \cdot 21111111 = 445679007654321 \enspace. $$

The effect of the carries is initially visible in the middle digits, which depend on the most partial products.

Fabio Somenzi
  • 7,316
  • 2
  • 16
  • 26
11

I'll make it really simple - you could explain to your son the exact reason after reading the answer.

Let the 2-digit number in question be represented as: $10a+b$

Now, $$(10a+b)^2=100a^2+b^2+20ab$$ On reversing its digit, you get: $$(10b+a)^2=100b^2+a^2+20ba$$

Notice that, a 3 digit number can be represented as $100x+10y+z$, and that in the above case, IFF $$20ab<100;b^2<10;a^2<10$$are satisfied, we can have numbers satisfying the property your son noticed. This is because, if any one of the 3 conditions above were not true, it would result in carried-over addition. Eg: For 14, $4^2<10$ is clearly not true. It can be seen that: $$14*14=196=100*1^2+4^2+20*1*4$$ And that: $$41*41=100*4^2+1^2+20*4*1\ne196$$ So the only numbers satisfying it are: $00,01,02,03,10,11,12,13,20,21,22,30,31$


For the second part of your question, it can be seen that: $$(10a+b)+(10a+b)=2(10a+b)=20a+2b$$ And on reversing the digits,: $$(10b+a)+(10b+a)=2(10b+a)=20b+2a$$ Clearly, iff $20a,20b<100$ and $2a,2b<10$, i.e. $a,b<5$, the observation your son made holds.

So 14, unlike in the multiplication scenario, actually fulfills the above condition. (Hence $14+14=28$ & $41+41=82$)

So the only numbers satisfying it are: $00,01,02,03,04,10,11,12,13,14,20,21,22,30,31,33,40,41,44$

10

It is not merely a coincidence. Rather, it is a special case of the fact that reversing the coefficients of a polynomial is a multiplicative operation (curiously this is not well known, e.g. see prior answers).

Let $\,f = a_n x^n +\cdots a_1 x + a_0\,$ be a polynomial in $x.\,$ Reversing its coefficients yields

$\quad\ \ \bar f = a_0 x^n + \cdots a_{n-1}x + a_n = x^n f(x^{-1}),\ $ the reverse (or reciprocal) of $\,f.$

It is easy to show $\overline{fg}\, =\, \bar f\bar g,\,$ i.e. polynomial reversal is multiplicative. For example

$\qquad \begin{align} (1x+2)(1x+3)\, &= 1x^2+5x+6\, \overset{\large x\, =\, 10}\Longrightarrow\, 12\cdot 13\, =\, 156\\ \overset{\rm reverse}\Longrightarrow (2x+1)(3x+1)\, &= 6x^2+5x+1\ \ \Longrightarrow\,\ \ 21\cdot 31\, =\, 651 \end{align}$

Your examples are special cases when the product is a square (of linear polynomials). For the polynomials to yield integer reversals when evaluated at the radix $\,x=10\,$ it is necessary that all polynomials (including the product) have nonnegative coefficients less than the radix.

Bill Dubuque
  • 257,588
  • 37
  • 262
  • 861
3

Motivated by the proofs above, I thought of the more general case:

Suppose that $a,b,c,d,x,y,z$ are integers such that $ 0 \le a,b,c,d,x,y,z < 10$. Furthermore, let $(10 a + b) \times (10c + d)= xyz$. Then, for what values of $a,b,c,d$ do we have $ (10b+a) \times (10d + c) = zyx$?

For example, $14 \times 12 = 168$ and $41 \times 21 = 861$. Extending the proofs provided by others in the above posts to the present case, we have $$ \left(10 a + b \right) \times \left( 10c + d\right) = 100 ac + 10(ad + bc) + bd. $$

Similarly, $$ \left(10 b + a \right) \times \left( 10d + c\right) = 100 bd + 10(bc + ad) + ac. $$

Suppose $0 \le ac,bd < 10$ and $ad+bc <10$. Then, there is no carry-over and we have that $ (10b+a) \times (10d + c) = zyx$.

This opens up a lot more possibilities. Fascinating stuff!

hpc
  • 131
  • 2