3n+1 problem solution. shows the right output but for some reason its failing on the programming challenges site