I want to rank and unrank permutations 1...n (size=n) which have following 2 constraints:
1...n
The permutation has just one cycle. Example: 2341
2341