I know that GCD summation function ($\sum_{i=1}^{i=n} \gcd(i, n)$ is multiplicative. Thus it can be calculated in $O(\log n)$ complexity using factorization.
But I want to want to compute the same function for but any given range, like for range $[x, y]$, $\sum_{i=x}^{i=y} \gcd(i, n)$. Can it be done in complexity less than $O(n \log n)$ where $\log n$ comes from the time to calculate gcd function?