Permutation Powers
A permutation of can be represented in one-line notation as . If all permutations are written in lexicographic order then is the position of in this -based list.
For example, because the six permutations of in lexicographic order are:
For a positive integer , we define the following permutation of with :
where is the inverse permutation of .
Define , where is the permutation arising from applying times.
For example, , and .
Find . Give your answer modulo .
置换的幂
集合的任意置换可以用一行记法表示为。如果将所有个置换按字典序排列,那么即是置换在这个排列中的位置(从开始计数)。
例如,,因为的六个置换按字典序排列为:
对于正整数,令,并定义如下的置换:
其中表示的逆置换。
定义,其中是指将置换应用次得到的置换。
已知,,。
求,并对取余作为你的答案。
Gitalking ...