by

If you start with a positive integer, reverse the digits, and add that to the original number you sometimes get a palindrome.  For example,  123+321=444, and 1047+7401=8448.

But sometimes you don’t.  In that case, you might need to repeat the process a few times (where “a few” could mean “a lot”).  For example, 498+894=1392, then 1392+2931=4323, and finally 4323+3234=7557.

Based on this, we can define the palindromic order of a number as the number of time that you need to Reverse and Add before coming up with a palindrome.  In the examples above, 123 and 1047 have a palindromic order of 1, while 498 has a palindromic order of 3.  [Presumably under this definition a palindrome like 838 has palindromic order of 0.]  Incidentally, this definition of palindromic order is the one used by Susan Eddings here, as opposed to the one referenced in titles like “Optimization of the palindromic order of the TtgR operator enhances binding cooperativity” in The Journal of Molecular Biology.

So here’s the question:  Does every positive integer have a (finite) palindromic order?  In other words, if you pick a number and repeat this process, possibly neglecting all of your work and home commitments except for feeding the cats and watching The Big Bang Theory, can you be assured that you will eventually get a palindrome?

And the answer is:  I don’t know.  And neither does anyone else, although there’s evidence that the answer is No.

That evidence is the number 196.  If you start with 196, you won’t get a palindrome at first, within 200 steps (as Jason Doucette shows), or even within 700 million iterations.   There are other numbers that appear to have this same awkward non-palindromic property  [for example, 691, and also 295, 394, and a bunch more], but the number 196 is the smallest; in its honor, this “Reverse and Add” algorithm has come to be known as the 196-algorithm.

So spending all your time concentrating on a brute force method of finding out if 196 continues to produce non-palindromes is going to be tedious.  In good news, you could explore other interesting questions:  what do you notice about numbers with palindromic order 1?  Can you find one with palindromic order 4? Which number(s) under 100 has the largest palindromic order?

As a side note, I ran across this property while looking for  interesting mathematical processes that resulted in the sequence 2, 4, 6, 8, 10, 11, [part of my ongoing quest to find Patterns that Fail].  It turns out that if you look at which numbers can be written as the sum of a positive integer plus its reverse, you initially get the sequence 0, 2, 4, 6, 8, 10,  [0=0+0, 2=1+1, up to 10=5+5] but then 11 shows up, since 11=10+01.

The picture above is the Shoulder Sleeve Insignia of the 196th Infantry Bridage.  Isn’t the symmetry a nice parallel to the whole Reverse and Add idea?

### 5 Responses to “Reverse and Add”

1. Matthew Doucette Says:

What’s interesting to note is 691 is the reverse of 196, so of course it is not going to form a palindrome just like 196: 196+961 = 691+196. They both start the same thread.

And, of course, any number in an non-palindromic thread is also starts a non-palindromic thread.

By the way, I’m Jason’s brother. Stumbled on here via Google Alert!

2. Ξ Says:

Thanks Matthew! I also think it’s interesting that there’s a +99 pattern among the numbers 196, 295, 394, 493, 592, and 691. It makes me think 97 should have also caused problems, except it didn’t.

Incidentally, I was looking around your site and enjoyed your article Hectomillionaire vs. Centimillionaire.

3. Matthew Doucette Says:

Interesting pattern… thanks about the article! 🙂

4. Jason Doucette Says:

The 196, 295, 394, 493, 592, 691 pattern is simple once you think about it a little: since the outer digits are what’s added, once you have a first number (196), and you see that 1+6 are what is added to get the sum, any other combination of those 2 digits that equal 7 will result in the same sum (1+6=7, 2+5=7, 3+4 =7, 4+3=7, 5+2=7, 6+1=7). It just so happens that when you +100 and -1 you get 99, but this pattern cannot continue beyond the extremes of having the outer digits = 7. This is all specific to the 196 case.

I coined these numbers as ‘consequences’ of 196. They can occur for all numbers, as I showed on my webpage:
http://www.jasondoucette.com/worldrecords.html
“For instance, a few consequences of 140,669,390 are: 150,669,380, 160,669,370, 170,669,360, 180,669,350, 190,669,340.” (the 2nd innermost digits are what changes).

Becuase I’m modifying ONLY two sum-matching digits at a time, and incrementing one while decrementing the other, the sum will not change. I use this as an optimization for my “Most Delayed Palindromic Number” search — I only test one of them and know the answer to them all. 🙂 This provided an *exponential* speed up that allowed me to blow the old world record (10-digit 1,005,499,526) out of the water (19-digit 1,186,060,307,891,929,990):
http://www.jasondoucette.com/pal/1186060307891929990

5. Ξ Says:

Right — that makes sense about the 7s now that you described it.

I like how you have the list of Most Delayed Palindromic Numbers as an example of how bad it can be (well, and still work).