next permutation
get nth permutation sequence