Since { n m / n } = 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\{nm/n\}=0 { nm / n } = 0 , we may write
F n ( m ) = ∑ k = 1 n − 1 { k m / n } k . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)=\sum_{k=1}^{n-1}\frac{\{km/n\}}{k}. F n ( m ) = k = 1 ∑ n − 1 k { k m / n } . For 1 ≤ k ≤ n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1\le k\le n-1 1 ≤ k ≤ n − 1 , let
r k : = n { k m n } . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_k:=n\left\{\frac{km}{n}\right\}. r k := n { n k m } . Then r k \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_k r k is the least nonnegative residue of k m \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
km k m modulo n \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
n n , and
F n ( m ) = 1 n ∑ k = 1 n − 1 r k k . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)=\frac1n\sum_{k=1}^{n-1}\frac{r_k}{k}. F n ( m ) = n 1 k = 1 ∑ n − 1 k r k . Let d = gcd ( m , n ) \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d=\gcd(m,n) d = g cd( m , n ) , and write n = d b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
n=db n = d b and m = d a \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
m=da m = d a with gcd ( a , b ) = 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\gcd(a,b)=1 g cd( a , b ) = 1 . We first determine the multiset of residues { r k : 1 ≤ k ≤ n − 1 } \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\{r_k:1\le k\le n-1\} { r k : 1 ≤ k ≤ n − 1 } . Every k ∈ { 1 , … , n − 1 } \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
k\in\{1,\dots,n-1\} k ∈ { 1 , … , n − 1 } can be written uniquely as
k = t b + s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
k=tb+s k = t b + s with 0 ≤ t ≤ d − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
0\le t\le d-1 0 ≤ t ≤ d − 1 and 0 ≤ s ≤ b − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
0\le s\le b-1 0 ≤ s ≤ b − 1 .
If s = 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
s=0 s = 0 , then k = t b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
k=tb k = t b and
k m = ( t b ) ( d a ) = t d a b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
km=(tb)(da)=tda\,b k m = ( t b ) ( d a ) = t d a b is divisible by d b = n \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
db=n d b = n , so r k = 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_k=0 r k = 0 . Hence 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
0 0 occurs exactly d − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d-1 d − 1 times, corresponding to t = 1 , … , d − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
t=1,\dots,d-1 t = 1 , … , d − 1 .
Now fix 1 ≤ s ≤ b − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1\le s\le b-1 1 ≤ s ≤ b − 1 . Modulo n = d b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
n=db n = d b we have
k m = ( t b + s ) d a ≡ s d a ( m o d d b ) , \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
km=(tb+s)da\equiv sda \pmod{db}, k m = ( t b + s ) d a ≡ s d a ( mod d b ) , so
r k = d ρ s , \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_k=d\rho_s, r k = d ρ s , where ρ s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\rho_s ρ s is the least positive residue of a s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
as a s modulo b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
b b . Because gcd ( a , b ) = 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\gcd(a,b)=1 g cd( a , b ) = 1 , multiplication by a \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
a a permutes the nonzero residue classes modulo b \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
b b . Therefore, as s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
s s runs through 1 , … , b − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1,\dots,b-1 1 , … , b − 1 , the values ρ s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\rho_s ρ s run through 1 , … , b − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1,\dots,b-1 1 , … , b − 1 exactly once. For each fixed s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
s s , the residue r t b + s \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_{tb+s} r t b + s is independent of t \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
t t , and t \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
t t has exactly d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d d possible values. Thus the multiset { r k : 1 ≤ k ≤ n − 1 } \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\{r_k:1\le k\le n-1\} { r k : 1 ≤ k ≤ n − 1 } consists of
d , 2 d , … , ( b − 1 ) d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d,2d,\dots,(b-1)d d , 2 d , … , ( b − 1 ) d each repeated exactly d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d d times, together with 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
0 0 repeated exactly d − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d-1 d − 1 times.
Let
z 1 ≥ z 2 ≥ ⋯ ≥ z n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_1\ge z_2\ge \cdots \ge z_{n-1} z 1 ≥ z 2 ≥ ⋯ ≥ z n − 1 be the decreasing rearrangement of r 1 , … , r n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_1,\dots,r_{n-1} r 1 , … , r n − 1 . Then the preceding description shows that
n − d , … , n − d ⏟ d times , n − 2 d , … , n − 2 d ⏟ d times , … , d , … , d ⏟ d times , 0 , … , 0 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\underbrace{n-d,\dots,n-d}_{d\text{ times}},
\underbrace{n-2d,\dots,n-2d}_{d\text{ times}},
\dots,
\underbrace{d,\dots,d}_{d\text{ times}},
0,\dots,0 d times n − d , … , n − d , d times n − 2 d , … , n − 2 d , … , d times d , … , d , 0 , … , 0 is exactly the sequence ( z 1 , … , z n − 1 ) \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
(z_1,\dots,z_{n-1}) ( z 1 , … , z n − 1 ) .
We next use the elementary ordering principle that for fixed nonnegative numbers, the weighted sum with weights 1 , 1 / 2 , … , 1 / ( n − 1 ) \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1,1/2,\dots,1/(n-1) 1 , 1/2 , … , 1/ ( n − 1 ) is maximized by placing the numbers in decreasing order. Indeed, if a sequence ( u 1 , … , u n − 1 ) \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
(u_1,\dots,u_{n-1}) ( u 1 , … , u n − 1 ) has an inversion u i < u j \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
u_i<u_j u i < u j with i < j \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i<j i < j , then swapping u i \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
u_i u i and u j \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
u_j u j changes ∑ u k / k \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\sum u_k/k ∑ u k / k by
u j i + u i j − u i i − u j j = ( u j − u i ) ( 1 i − 1 j ) > 0. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\frac{u_j}{i}+\frac{u_i}{j}-\frac{u_i}{i}-\frac{u_j}{j}
=(u_j-u_i)\left(\frac1i-\frac1j\right)>0. i u j + j u i − i u i − j u j = ( u j − u i ) ( i 1 − j 1 ) > 0. Repeatedly removing inversions yields the decreasing rearrangement, so
∑ k = 1 n − 1 r k k ≤ ∑ k = 1 n − 1 z k k . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\sum_{k=1}^{n-1}\frac{r_k}{k}\le \sum_{k=1}^{n-1}\frac{z_k}{k}. k = 1 ∑ n − 1 k r k ≤ k = 1 ∑ n − 1 k z k . Therefore
F n ( m ) ≤ 1 n ∑ k = 1 n − 1 z k k . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)\le \frac1n\sum_{k=1}^{n-1}\frac{z_k}{k}. F n ( m ) ≤ n 1 k = 1 ∑ n − 1 k z k . We now compare z k \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_k z k with the extremal profile n − k \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
n-k n − k . Fix i ∈ { 1 , … , n − 1 } \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i\in\{1,\dots,n-1\} i ∈ { 1 , … , n − 1 } . If i ≤ n − d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i\le n-d i ≤ n − d , then i = ( j − 1 ) d + r \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i=(j-1)d+r i = ( j − 1 ) d + r for some 1 ≤ j ≤ b − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1\le j\le b-1 1 ≤ j ≤ b − 1 and 1 ≤ r ≤ d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
1\le r\le d 1 ≤ r ≤ d , so
z i = n − j d . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_i=n-jd. z i = n − j d . Since i ≤ j d \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i\le jd i ≤ j d , we obtain
z i = n − j d ≤ n − i . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_i=n-jd\le n-i. z i = n − j d ≤ n − i . If i ≥ n − d + 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
i\ge n-d+1 i ≥ n − d + 1 , then z i = 0 ≤ n − i \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_i=0\le n-i z i = 0 ≤ n − i . Hence
z i ≤ n − i for every 1 ≤ i ≤ n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_i\le n-i
\qquad\text{for every }1\le i\le n-1. z i ≤ n − i for every 1 ≤ i ≤ n − 1. Consequently,
F n ( m ) ≤ 1 n ∑ i = 1 n − 1 n − i i = ∑ i = 1 n − 1 1 i − n − 1 n = H n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)\le \frac1n\sum_{i=1}^{n-1}\frac{n-i}{i}
=\sum_{i=1}^{n-1}\frac1i-\frac{n-1}{n}
=H_n-1. F n ( m ) ≤ n 1 i = 1 ∑ n − 1 i n − i = i = 1 ∑ n − 1 i 1 − n n − 1 = H n − 1. This proves the upper bound.
It remains to determine when equality holds. If d > 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d>1 d > 1 , then
z 1 = n − d < n − 1 , \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_1=n-d<n-1, z 1 = n − d < n − 1 , so the inequality z 1 ≤ n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_1\le n-1 z 1 ≤ n − 1 is strict, and therefore
1 n ∑ i = 1 n − 1 z i i < 1 n ∑ i = 1 n − 1 n − i i . \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\frac1n\sum_{i=1}^{n-1}\frac{z_i}{i}
<
\frac1n\sum_{i=1}^{n-1}\frac{n-i}{i}. n 1 i = 1 ∑ n − 1 i z i < n 1 i = 1 ∑ n − 1 i n − i . Hence equality in F n ( m ) ≤ H n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)\le H_n-1 F n ( m ) ≤ H n − 1 is impossible unless d = 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d=1 d = 1 .
Assume now that F n ( m ) = H n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)=H_n-1 F n ( m ) = H n − 1 . Then necessarily d = 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
d=1 d = 1 . In that case the multiset of residues is exactly { 1 , 2 , … , n − 1 } \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\{1,2,\dots,n-1\} { 1 , 2 , … , n − 1 } , so the decreasing rearrangement is
z i = n − i for every 1 ≤ i ≤ n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
z_i=n-i
\qquad\text{for every }1\le i\le n-1. z i = n − i for every 1 ≤ i ≤ n − 1. These values are pairwise distinct. Equality in the rearrangement step
∑ k = 1 n − 1 r k k ≤ ∑ k = 1 n − 1 z k k \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\sum_{k=1}^{n-1}\frac{r_k}{k}\le \sum_{k=1}^{n-1}\frac{z_k}{k} k = 1 ∑ n − 1 k r k ≤ k = 1 ∑ n − 1 k z k can therefore occur only if there are no inversions to remove, that is,
r k = z k = n − k for every 1 ≤ k ≤ n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_k=z_k=n-k
\qquad\text{for every }1\le k\le n-1. r k = z k = n − k for every 1 ≤ k ≤ n − 1. Taking k = 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
k=1 k = 1 gives
m = r 1 = n − 1 , \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
m=r_1=n-1, m = r 1 = n − 1 , because 0 ≤ m ≤ n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
0\le m\le n-1 0 ≤ m ≤ n − 1 and r 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
r_1 r 1 is the least nonnegative residue of m \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
m m modulo n \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
n n .
Conversely, if m = n − 1 \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
m=n-1 m = n − 1 , then
F n ( n − 1 ) = ∑ k = 1 n − 1 { k ( n − 1 ) / n } k = ∑ k = 1 n − 1 1 − k / n k = H n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(n-1)=\sum_{k=1}^{n-1}\frac{\{k(n-1)/n\}}{k}
=\sum_{k=1}^{n-1}\frac{1-k/n}{k}
=H_n-1. F n ( n − 1 ) = k = 1 ∑ n − 1 k { k ( n − 1 ) / n } = k = 1 ∑ n − 1 k 1 − k / n = H n − 1. Thus
F n ( m ) = H n − 1 ⟺ m = n − 1. \newcommand{\Mbegin}{\left[ \begin{matrix}}
\newcommand{\Mend}{\end{matrix} \right]}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Otil}{\widetilde{O}}
\newcommand{\poly}{\mathrm{poly}}
\newcommand{\diag}{\mathsf{diag}}
\newcommand{\col}{\mathrm{col}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
F_n(m)=H_n-1
\quad\Longleftrightarrow\quad
m=n-1. F n ( m ) = H n − 1 ⟺ m = n − 1.