This article will assume the reader is familiar with basic algebra, some math terminology, and basic number theory. One should be, comfortable working with basic algebraic equations, know terminologies such as “natural numbers’ and, “decimals”, and, know the concept of factors, multiples and, primes. The concepts of number theory will be explained in the article, and therefore isn’t strictly necessary. However it is advised, as it will make it easier to understand. The goal of this article is to introduce, observe, and solve a simple problem, whilst explaining number theory. It aims to be an enjoyable read to anyone who, have finished at least middle school math.
While I was browsing through YouTube, I came across a video showing the properties of 2025. Out of all the interesting properties of 2025, one property caught my eye: $(20+25)^2=2025$. This equation seems to suggest, the square of sums, $(20+25)^2$ is equal to the combination of the 2 numbers( $20$ and $25$ combines to $2025$).
Obviously, this property is not general and, works only on a handful of pairs. This got me wondering, “Are there any other numbers that have this property?”, if so, what are they, and how can we find them? This were my journey started, a journey to find all pair of numbers, such that, the sum of squares is equal to its concatenation.
The problem seems simple at first, but when we try to solve it, we get stuck. The issue is, concatenation is not a well defined mathematical operation, so let’s define it.
The concatenation of two natural numbers $a, b$ is defined as: $10^n⋅a + b$ , where $n$ is a number of digits of $b$.
With these definitions our goal is now clear.
Find all pairs of a, b such that, $(a+b)^2=a\cdot 10^n+b$
Before we go any further, there is one thing to note. We will be finding the values of $a$ and, $b$, given the value of $n$. This will make the problem easier to work with.
Then without further ado, let’s solve this problem.
The first thing to do when solving a problem is, Brute Force. Try the first thing that comes to mind, and improve upon it later.
The first thing that came to my mind was this. Check all values of b, then hope there exist a natural number $a$, which satisfy our equation. With this in mind I constructed the following steps.
<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
With this algorithm we’ve done it! We found a way to solution our problem!