JuliaLang/julia — pull request #4978 by davidavdav (2013-11-29 11:34:26+00:00)
Title: nthperm

extended combinatorics to include k = nthperm(p) to be the inverse of p = nthperm([1::N], k). Code corrected by Kevin Squire on julia-users.