title: Rank and unrank permutations with just one cycle
body: <p>I want to rank and unrank permutations with one cycle in lexicographical order with a given len.</p>
  
  <p>A permutation with one cycles is where you can visit in this cycle each element.</p>
  
  <p><code>p:= (2,3,1)</code> is a permutation with one cycle. Has rank 1.</p>
  
  <p><code>p:= (3,1,2)</code> has 1 cycle too, but rank 2, because the permutation is lexicographical greater the frist so it becomes a greater rank.</p>
  
  <p><code>p:= (1,2,3)</code> is a permutation with 3 cycles. <code>(1),(2),(3)</code></p>
  
  <p>How can I efficently rank (permutation with one cycle to rank) and unrank (rank + len to permutation with one cycle) in lexicographical order? I have no idea how to archive this.</p>