Remark. There is a simple formula for the inverse map ; see D. J. Bernstein, A Non-Iterative 2-adic Statement of the 3x+1 Conjecture, Proc. Amer. Math. Soc., 121, 405-408.