# Weird phenomenon with the perfect squares of numbers under 14.

In math class (algebra 1), a classmate of mine realized this weird thing when asked the square or 21. In her head, knowing that $$12^2$$ = 144, she said 12 flipped is 21 so 144 flipped is 441, which is, in fact $$21^2$$. This doesn't work once you go past 14.

More examples (0)$$1^2$$ = (00)1 and $$10^2$$ = 100 $$13^2$$ = 169 and $$31^2$$ = 961

Why does this happen? Why doesn't it happen above 14? Are there other places this might work?

• This just works for (some) small numbers because there is no carrying involved. It also works for longer numbers, like $112, 211$ or even $1112, 2111$ where no carrying is involved. – lulu May 21 at 22:45
• Just a random comment: this was one of the first observations I made as a kid that got me into learning basic number theory! It's a great field. – Don Thousand May 21 at 22:49
• I think you meant $441$ where you wrote $442$. – J. W. Tanner May 21 at 22:54
• Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax. – dantopa May 21 at 23:00

You are squaring $$10a+b$$ vs. $$10b+a$$, and the squares are $$100a^2+10\cdot2ab+b^2$$ vs. $$100b^2+10\cdot2ab+a^2$$.
If $$a^2$$ and $$b^2$$ are a single digit ($$0^2,1^2,2^2,3^2$$) as well as $$2ab$$ (hence not $$2\cdot3$$), the swap works.