How to compute the value of $$[\gcd(1,x)+\gcd(2,x)+\gcd(3,x)+....+\gcd(x,x)]$$ efficiently? When x can be as large as million.
Calculating greatest common divisor series
user111103
- 33
- 2