I want to rank and unrank permutations with duplicates and just 3 (0,1,2) different elements. Also no 1 follows directly after a 2 and no 2 f
3 (0,1,2)
no 1 follows directly after a 2
no 2 f