solve 3x+1 problem