(noch nicht übersetzt)

Problem 903

A permutation π of {1,,n} can be represented in one-line notation as π(1),,π(n). If all n! permutations are written in lexicographic order then rank(π) is the position of π in this 1-based list.

For example, rank(2,1,3)=3 because the six permutations of {1,2,3} in lexicographic order are: 1,2,31,3,22,1,32,3,13,1,23,2,1

Let Q(n) be the sum πn!i=1rank(πi), where π ranges over all permutations of {1,,n}.

For example, Q(2)=5, Q(3)=88, Q(6)=133103808 and Q(10)468421536(mod109+7).

Find Q(106). Give your answer modulo (109+7).