Evaluate GCD series in best optimal way

71 Views Asked by At

I want to evaluate this function : $F(x) = 1/GCD(1,x) + 2/GCD(2,x) + ... + x/GCD(x,x)$

Is there any short formula rather than taking GCD with all numbers to evaluate this function for given x ?