in reply to Permutation seed generator

if i understand right, you have to remove some elements from the list to get only sorted permutations.

for (0, 1, 2, 3), if you want 3 elements, sorted:
remove 3: (0, 1, 2)
remove 2: (0, 1, 3)
remove 1: (0, 2, 3)
remove [0]: (1, 2, 3)

extending to a general form, you have to permute the removals:
for (0, 1, 2, 3, 4) want 3 elements:
remove 3, 4: (0, 1, 2)
remove 2, 4: (0, 1, 3)
remove 2, 3: (0, 1, 4)
remove 1, 4: (0, 2, 3)
remove 1, 3: (0, 2, 4)
remove 1, 2: (0, 2, 3)
remove [0], 4: (1, 2, 3)
remove [0], 3: (1, 2, 4)
remove [0], 2: (1, 3, 4)
remove [0], 1: (2, 3, 4)

the remove indexes are the permutations of indexes 0..4 in 2 elements

Oha