Find $e \in \{0,1,\ldots,22\}$ such that the product $\prod_{i=6}^{18} i$ is congruent to $e$ modulo $23$
Solution 1:
Recall for a prime $p$, $(p-1)! \equiv_{p} -1 $. It follows $$2 \cdot 3 \cdot 4 \cdot 5\cdot \left( \prod_{i=6}^{18} i\right)\cdot (-4) \cdot (-3) \cdot (-2) \cdot (-1)\equiv_{23} (-1)$$ $$\Rightarrow 5 \cdot \left(\prod_{i=6}^{18} i \right) \equiv_{23} -1 \quad \Rightarrow \prod_{i=6}^{18} i \equiv_{23} 9 $$