projecteuler.net

Product of Gauss Factorials

 Published on Sunday, 4th April 2021, 08:00 am; Solved by 271

Problem 754

The Gauss Factorial of a number $n$ is defined as the product of all positive numbers $\leq n$ that are relatively prime to $n$. For example $g(10)=1\times 3\times 7\times 9 = 189$.

Also we define $$\displaystyle G(n) = \prod_{i=1}^{n}g(i)$$

You are given $G(10) = 23044331520000$.

Find $G(10^8)$. Give your answer modulo $1\,000\,000\,007$.