Given an odd number $n >1$, let \begin{align*} S =\{ k \mid 1 \le k < n , \gcd(k,n) =1 \} \end{align*}and let \begin{align*} T = \{ k \mid k \in S , \gcd(k+1,n) =1 \} \end{align*}For each $k \in S$, let $r_k$ be the remainder left by $\frac{k^{|S|}-1}{n}$ upon division by $n$. Prove \begin{align*} \prod _{k \in T} \left( r_k - r_{n-k} \right) \equiv |S| ^{|T|} \pmod{n} \end{align*}
Problem
Source: Balkan MO ShortList 2011 N1
Tags:
07.04.2020 08:44
Note that $|S|=\phi(n)$, which is an even positive integer for all odd $n>1$. Then, for any $k \in S$, using Binomial Theorem, we have \begin{align*} n(r_k-r_{n-k}) &\equiv k^{\phi(n)}-(n-k)^{\phi(n)} \pmod{n^2} \\ &\equiv k^{\phi(n)}-(-k)^{\phi(n)}-n \cdot \phi(n) \cdot (-k)^{\phi(n)-1} \pmod{n^2} \\ &\equiv n \cdot \phi(n) \cdot k^{\phi(n)-1} \pmod{n^2} \\ \implies r_k-r_{n-k} &\equiv \phi(n) \cdot k^{\phi(n)-1} \equiv \phi(n) \cdot k^{-1} \pmod{n} \\ \end{align*}where we use $k^{\phi(n)} \equiv 1 \pmod{n}$ at the end. Thus, we get $$\prod _{k \in T} \left( r_k - r_{n-k} \right) \equiv |S| ^{|T|} \pmod{n} \\ \iff \prod _{k \in T} \left( \phi(n) \cdot k^{-1} \right) \equiv (\phi(n)) ^{|T|} \pmod{n}$$Then it suffices to show that $$\prod _{k \in T} k^{-1} \equiv 1 \pmod{n} \iff \prod _{k \in T} k \equiv 1 \pmod{n}$$We claim that if $k \in T$, then $k^{-1} \pmod{n} \in T$. Suppose not. Then there exists some prime $p \mid n$, such that either $p \mid k^{-1}$ or $p \mid k^{-1}+1$. Since $kk^{-1} \equiv 1 \pmod{p}$, so the first case gives $p \mid k$, while the second one gives $p \mid k+1$. Both of these are untrue for $k \in T$, and so our claim must be true. Also note that there are two cases when $k=k^{-1}$, namely $k=1$ and $k=n-1$. But, $n-1 \not \in T$, so we don't need to worry about that. The above analysis directly gives the desired result. $\blacksquare$