linguistic:voice_change, linguistic:paraphrasing
Gauss's generalization

Gauss proved that ∏ k = 1 gcd (k, m) = 1 m k ≡ { − 1 (mod m) if m = 4, p α, 2 p α 1 (mod m) otherwise {\displaystyle \prod _{k=1 \atop \gcd(k,m)=1}^{m}\!\!k\ \equiv {\begin{cases}-1{\pmod {m}}&{\text{if }}m=4,\;p^{\alpha },\;2p^{\alpha }\\\;\;\,1{\pmod {m}}&{\text{otherwise}}\end{cases}}} where p represents an odd prime and α {\displaystyle \alpha } a positive integer. That is, the product of the positive integers less than m and relatively prime to m is one less than a multiple of m when m is equal to 4, or a power of an odd prime, or twice a power of an odd prime; otherwise, the product is one more than a multiple of m. The values of m for which the product is −1 are precisely the ones where there is a primitive root modulo m.