Let $n$ be a positive integer and $\mathrm{ord}_{n}(a)$ be the least positive integer $d$ such that $n\mid a^{d}-1$. I wanted to know if for some choice of $y=y(x)$, one can obtain asymptotics for the sum $$f(x,y):=\sum_{a\le y}\sum_{\substack{n\le x\\ \gcd(n,a)=1}}\frac{\gcd(n,\mathrm{ord}_n(a))}{\mathrm{ord}_n(a)}$$ where $n$ and $a$ are positive integers and $y\rightarrow\infty$ as $x\rightarrow\infty.$

3more comments