From the title I expected http://en.wikipedia.org/wiki/FRACTRAN (see the list of fractions at the top).