Most of the positive integers can form a palindrome through the iterative process of repeatedly reversing its digits and adding the resulting numbers. For example, for the number 19,
can form the palindrome 121 after 2 iterations. In this case, we call 19 the root of palindrome 121. A number is the root of palindrome if it is the smallest number such that after going through some number of iterations the first palindrome it forms is .
What is the root of the following number?
4668731596684224866951378664
Clarification :
Although 7 can form 121 after some number of iterations, it is not the root of 121 because the first palindrome formed by it is 55.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I'm not sure why there is a very low success rate. Here is the code. Start from every number and let it go through the iterative process.
I suspect the bug most of the people make is line 19 and 20. If you doesn't break the process after it founds its first palindrome, you are going to get the answer 10137, but the answer is really 10677.