Read Time: 4 Minutes

After playing with my calculator in math class for some time I noticed a peculiar pattern in palindromic numbers. It seemed that some times the product of two palindromic numbers is another palindromic number. Why does this happen? I had to find out, and to do so I realised that I had to find a way to represent individual digits algebriacly in a number. The notation I developed to explain this phenomenum helped make the journey to understand it much easier.

Let A = 5 and B = 6.

.A.B = 56.

With this notation in any base *b*

.A.B.C.D = *b ^{3}*A +

In addition, let .A,B,C =

From this we can develop a simple set of rules for basic arithmetic. Addition - .A.B + .C.D =bA +^{1}bB +^{0}bC +^{1}bD =^{0}b(A+C) +^{1}b(B+D) = .(A+C).(B+D) Multiplication - .A.B * .C.D = (^{0}bA +^{1}bB)(^{0}bC +^{1}bD) =^{0}bAC +^{2}bCB +^{1}bAD +^{1}bBD = .AC.(CB+AD).BD Division - .A.B / .C.D = (^{0}bA +^{1}bB)/(^{0}bC +^{1}bD) = (^{0}bA / (^{1}bC +^{1}bD)) + (^{0}bB / (^{0}bC +^{1}bD)) = (A / (C +^{0}bD)) + (^{-1}bB / (^{0}bC +^{1}bD)) = (A/(C,D)) + (B/(C.D)) = (A/(C,D)),(B/(C,D)) We also have to consider numbers in which one of the digits is greater than^{0}b, numbers we shall call astable, like in base 10 .12.3.11 = 100*12 + 10*3 + 1*11 = 1000*1 + 100*2 + 10*3 + 10*1 + 1*1 = .1.2.4.1 It essentially is a carry to any digit that is too big.

There is a lot you can do with Digit Based Algebra(DBA), but for this application only multiplication will be necessary. We will use it to find out why palindromes multiply to give other palindromes like 11*11=121 and others do not like 55*55 = 3025.

Firstly lets investigate 2 digit palindromes: Using the definition of multiplication from above, .A.A * .B.B = .AB.2AB.AB

Aha! We have a have a reason for two digit palindromes, they will always multiply to give a 3 digit palindrome, however not all palndromes obtained this way are stable, and since AB+1 != AB there cannot be a carry. This means sometimes when the product of two two digit palindromes is found, the number will be astable, and as such not be a palindrome when made stable, this occurs when 2AB > *b*.

Before we get to the general case for palindromes of equal size lets look at 3 digit palindromes: .A.B.A * .C.D.C = (bA +^{2}bB +^{1}bA)(^{0}bC +^{2}bD +^{1}bC) =^{0}bAC +^{4}bAD +^{3}bAC +^{2}bBC +^{3}bBD +^{2}bBC +^{1}bAC +^{2}bAD +^{1}bAC = .AC.(AD+BC).(AC+BD+AC).(BC+AD).AC The same thing can be seen here, if 2AC+BD is less than^{0}bthen the product is a palindrome.

Observant readers may be able to notice a pattern here, the fact that it seems as if for two palindromes to multiply to a another palindrome the sum of the products of the digits in the same place must be less than the base.

This is true because the middle number of the product of two palindromes of size n is always in position *b ^{n}* and therefore will be the first digit of the first number times the last digit of the second number plus the second digit of the first number times the second last digit of the second number etc. Since a palindrome can be mirrored the point above is proven.

This is why palindromes multiply to give other palindromes. All this means that in base 10 the largest palindrome which can be written as the product of two equal palindromes without a zero is 111111111

I will explore further applications of DBA for gaining intuition and solving problems in future articles.