How could we derive a closed form for $\prod\limits_{i=1}^{n} i^{[(i,n)=1]}$?
Here "$[s]$" is the Iverson bracket and "$(a,b)$" is the greatest common divisor.
How could we derive a closed form for $\prod\limits_{i=1}^{n} i^{[(i,n)=1]}$?
Here "$[s]$" is the Iverson bracket and "$(a,b)$" is the greatest common divisor.
This is called a Gauss Factorial, and is used frequently in Modular arithmetic. It satisfies a theorem analogous to Wilson's Theorem, and can be also be thought of the $p$-adic gamma function.
Define $N_n !:=\prod_{{1\leq j\leq N}\atop{\gcd(j,n)=1}} j.$
We have the following congruence: $(n-1)_n!\equiv \begin{cases} -1\pmod n & \text{for }n=2,4,p^{\alpha},p^{2\alpha}\\ 1\pmod n & \text{otherwise} \end{cases}$
Lastly, $\Gamma_p(z)=\lim_{N\to z} (-1)^N (N-1)_p !$ where $N$ runs through any sequence of positive integers $p$-adically approaching $z$.
Remark: If you want some other form, inclusion exclusion implies that for squarefree $n$, $n_n! =n!\prod_{d|n}\left(d^{\frac{n}{d}}\left(\frac{n}{d}\right)!\right)^{\mu(d)}, $ where $\mu$ is the Möbius function.