Add integer to lehmer code, lehmer code to permutation