The 196-algorithm is the algorithm one uses to derive a palindromic number from an integer. The steps of it are:

  1. Take your integer, p
  2. Reverse p's digits to make q
  3. Let r = p + q
  4. Let p = r
  5. Repeat steps 2, 3 and 4 until r is a palindromic number

Example:

Start with p = 195
Then p + q = 786
Then p = 786
So now p + q = 1473
Then p = 1473
So now p + q = 5214
Then p = 5214
So now p + q = 9339

Now we have a palindrome we can stop and say that when 195 is put through the 196-algorithm, it produces the palindrome 9339.

Why 196?
The reason this algorithm is called the 196-algorithm is because 196 is the first number which does not rapidly become a palindrome when put through the algorithm, even after thousands of iterations.

Log in or register to write something here or to contact authors.