$\prod_{k=1}^n k\ \ \equiv 1 \bmod{n}$ where $gcd(k,n)=gcd(k+1,n)=1$

61 Views Asked by At

Let $$E_n = \left\{ k \in \mathbb{Z}\ \ | \ \ gcd(k,n) = gcd(k+1,n) = 1\wedge 1\le k\le n\right\}$$ I'd like to show that for $n > 2$ :

$$\prod_{k=1,\ k \in E_n}^n k\quad \equiv \quad 1\ \ \bmod{n}$$ There is probably an argument along the lines of $\forall k\exists! m$ such that $km\equiv 1\bmod{n}$, but I don't exactly know how to find that $m$.