Skip to main content
2 of 3
changed tags, changed to standard notation
YCor
  • 63.9k
  • 5
  • 187
  • 286

Calculating greatest common divisor series

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.