3n+1 refactored w bitwise operations