Write a program to solve the 3n+1 Problem http://www.spoj.com/problems/PROBTNPO/