Open sx349 opened 2 years ago
https://pe-cn.github.io/795/
Problem 795 Alternating GCD SumFor a positive integer $n$, the function $g(n)$ is defined as $$\displaystyle g(n)=\sum_{i=1}^{n} (-1)^i \gcd \left(n,i^2\right)$$ For example, $g(4) = -\gcd \left(4,1^
https://pe-cn.github.io/795/
Problem 795 Alternating GCD SumFor a positive integer $n$, the function $g(n)$ is defined as $$\displaystyle g(n)=\sum_{i=1}^{n} (-1)^i \gcd \left(n,i^2\right)$$ For example, $g(4) = -\gcd \left(4,1^