PE-CN / pe-cn-comments

2 stars 0 forks source link

Problem 795 | Project Euler | #797

Open sx349 opened 2 years ago

sx349 commented 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^