A palindrome is a word which reads the same backwards as it does forwards. Similarly, a number having this quality is considered 'palindromic'.
Consider the number 23. Reverse and add that number to 23 to yield the palindrome 55. This has taken one step.
Now consider the same reversal-summation process for 37. Over 2 steps it becomes the palindrome 121(37,73/110,011/121).
QUESTION: What 2 digit number requires the most stages to become a palindrome? How many stages is that, and what is the palindrome?
NOTES, THOUGHTS, CONSIDERATIONS:
1] It will become quickly evident that certain combinations will run out fast (like, why use 32 when 23 is its reverse).
2] Spreadsheet calculator - If you need one. Copy the formula ' =A1+A2 ' into cell 3 of a column. Copy it into each successively descending odd cell as may be needed.
Format the column as 'Number' having no decimal places so as to override that particular time when the Exp. Not. default would normally cut in.
Enter your chosen number into A1 and continue to place the reverse total of each odd row into the cell of the next even row.
3] Obviously such sequences do occur beyond 2 digit numbers and while I have some 3 digit challenges in my personal literature, I am wondering if there is some 'easy' way of when a number becomes a palindrome - obviously I assume that it will happen with any number eventually (but should I pose that question, or even present some of the 3 digit challenges?).
(In reply to re: computer solution
I have VB 5.0. But for this problem, extended precision is required and UBASIC provides that. We couldn't use 1000-decimal-digit numbers in in either QuickBasic or Visual Basic.
Posted by Charlie
on 2004-04-05 13:56:39