Translate an integer to base 36 (or 64) and back