Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: numtoperm
Section: combinatorics
C-Name: numtoperm
Prototype: LG
Description:
(small,int):vecsmall Z_to_perm($1, $2)
(small,gen):vecsmall numtoperm($1, $2)
Help: numtoperm(n,k): permutation number k (mod n!) of n letters (n
C-integer).
Doc: generates the $k$-th permutation (as a row vector of length $n$) of the
numbers $1$ to $n$. The number $k$ is taken modulo $n!\,$, i.e.~inverse
function of \tet{permtonum}. The numbering used is the standard lexicographic
ordering, starting at $0$.