e>, <code><a href="#perm_005flex_005frank">perm_lex_rank</a></code> and
<code><a href="#perm_005flex_005funrank">perm_lex_unrank</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) load(&quot;combinatorics&quot;)$
(%i2) perms_lex (4);
(%o2) [[1, 2, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [1, 3, 4, 2], 
[1, 4, 2, 3], [1, 4, 3, 2], [2, 1, 3, 4], [2, 1, 4, 3], 
[2, 3, 1, 4], [2, 3, 4, 1], [2, 4, 1, 3], [2, 4, 3, 1], 
[3, 1, 2, 4], [3, 1, 4, 2], [3, 2, 1, 4], [3, 2, 4, 1], 
[3, 4, 1, 2], [3, 4, 2, 1], [4, 