First, some definitions:

**Numerical Palindrome**- A number that reads the same both backward and forward, similar to a normal palindrome. For example, "12321", "5995", "999", and "8813200023188".**196 Algorithm**- Pick a number (ie, 841). Reverse its digits (148). Now add the reverse number to the original number (841+148=989). Very often, the result will form a palindrome. If not, repeat the process (586+685=1271; 1271+1721=2992). Neat, eh? So, why do they call this the 196 algorithm? Read on...**Lychrel Numbers**- Some numbers take rather a lot of repetitions of the 196 algorithm to reach a palindrome. Starting with 89, it takes 24 repetitions to finally reach the whopping 13 digit number given as the last numerical palindrome example above. Some numbers, however, never seem to reach a palindrome, and they have the name "Lychrel" numbers (pronounced "la-shrel"), named by Wade VanLandingham. The number 196 seems to never reach a palindrome, even after tens of millions of iterations of the 196 algorithm. Since every number less than 196 will reach a palindrome, it exists as the first Lychrel number.

Not all numbers that fail to reach a palindrome count as Lychrel numbers, though. Many simply exist as a direct consequence of an earlier Lychrel number (such as 887, which results from 196+691=887). Others, like 295, do not themselves form part of a different Lychrel's iterations, but still join up with it at some point (295+592=887, imagine that!). So, of any given series of numbers iterated with the 196 algorithm, only the lowest number that leads to that series counts as a proper Lychrel number.

Okay, I know, you can find all of this much better explained
elsewhere, and I'll give links to a few of them now (No exclusion
of good web pages intended... If you think you have a page on par
with one of these for quality of content, yet not totally redundant,
let me know and I'll consider giving you a link)

- 196 and Other Lychrel Numbers, Wade VanLandingham's site, seems to have the most links and good general information on the topic, and his blackboard and blackboard archives will contain the answers (or at least ponderings about those topics with no answer) to 99% of questions about Lychrel numbers. Additionally, Wade currently holds the record for calculating the most iterations of 196, and updates it regularly.
- Jason Doucette's World Records page covers the concept of "Longest Delayed Palindromes", a really neat approach to the 196 algorithm. These numbers eventually reach a palindrome, but not for quite a few iterations (The longest given on the site takes 192 iterations to reach an 87 digit palindrome!). He also has a lot of good links, and received mention in Yes Mag, A Canadian kids' science magazine, for earlier carrying the iteration of 196 itself to 13 million digits.
- The Palindrome 196 Problem, by Istvan Bozsik, has some nice charts, a handful of links, and some very useful insights into speedy implementation of the 196 algorithm on a computer. He held the 196 program speed record for almost a year.

As my contribution to the world of numerical palindromes,
aside from writing a variety of useful Lychrel-related
tools and holding a few current-and-past records myself,
I have decided to run this 196-and-Lychrel-oriented
source code repository.

Author |
Date |
Language |
Status |
Link |
Comments |

Barry Roberts | 04/27/2005 | C | PD? |
newbpal.zip |
Barry uses arbitrary-length integer routines to deal with actual numbers, rather than strings of digits. |

Matthew Stenson | 09/29/2004 | F90 + asm | GPL2 |
palindrome_gui.7z (archive includes v1) |
The most recent (final?) version of Matt's iterator. Added an assembly FAA routine for performance. |

Matthew Stenson | 08/30/2003 | C+MMX (VS) | GPL2 | 196xampl_vs.zip |
A port of my example code,
196xampl.zip, that builds under Visual Studio 6 with MASM. Thanks! |

Matthew Stenson | 08/19/2003 | Fortran 90 | GPL2 |
palindrome_gui.7z (archive includes v3) |
The first viable F90 implementation I've ever seen. Uses a lookup-table appproach |

Eric Goldstein | 03/22/2003 | Inline P4 asm | PD | e_goldst.c |
The current speed-record holding reverse-and-add implementation |

Prosper & Veigneau | 03/21/2003 | C | PD? | vp_sg.c |
An arbitrary-base vanilla-C implementation. Interesting optimizations, well worth studying |

Benjamin Despres | 10/04/2002 | C | GPL2 | isft2757.zip |
Windows GUI-mode version of the MOD-9 checker. Includes several data visualization tools |

Calin A. Culianu | 08/20/2002 | C++ | GPL2 | culianu.cpp |
A pure C++ version, quite readable, allows calculations in an arbitrary base |

Benjamin Despres | 07/26/2002 | C | GPL2 | check-2566.zip |
Verifies a save point in Istvan's file format, usign the MOD-9 checksum |

Benjamin Despres | 06/28/2002 | C + asm(MMX) | GPL2 | 196xampl.zip |
The once-fastest reverse-and-add code, since superseded a few times. |

David Gillies | 03/15/2002 | C | PD? | palin.c |
Linux version, makes use of a digit-at-a-time lookup table |

John Walker | 08/1987 | C | PD? | pquest.c |
The original, not all that fast, but of unquestionable historic value |

Those entries with a question mark in their status have an unknown official status, though for various reasons I assume them as released into the Public Domain. If you wrote one of these and wish it removed, contact me and I will immediately comply.

Anyone else wanting to post their source code here, please don't hesitate to contact me, though don't just send me unsolicited email attachments (your waste of time, not mine, so...). If you have my "real" email address, you can send me attachments; otherwise, email me at the address you see at the bottom of this page, and I'll reply from my real address (If I don't reply, most likely your email ended up accidentally erased in a mass spam-purging, so just try again a few days later). As I mentioned, I would recommend anyone posting source code release it under the GPL, which protects the author by defining very clear terms of use, credit, and distribution, as well as limiting liability.