Setting:
$$F(x)=\frac{x\log(x)}{8}+\sum _{j=2}^k -|A(x,j)| \tag{1}$$
appears to give the asymptotic $\sqrt{x\log(x)}$ for the least $k$ such that $F(x)$ is negative.
In general it appears that the least $k$ such that:
$$F(x)=\frac{f(x)}{8}+\sum _{j=2}^k -|A(x,j)| \tag{2}$$
is negative, has the asymptotic: $\sqrt{f(x)}$.
(*start*)
(*Mathematica*)
Clear[a, f, p];
nn = 2000;
p = 1;
f[n_] := n*Log[n]^p;
a[n_] := DivisorSum[n, MoebiusMu[#] # &];
Monitor[TableForm[
A = Accumulate[
Table[Table[If[n >= k, a[GCD[n, k]], 0], {k, 1, nn}], {n, 1,
nn}]]];, n]
TableForm[B = -Abs[A]];
Clear[A];
B[[All, 1]] = N[Table[f[n]/8, {n, 1, nn}]];
TableForm[B];
TableForm[B1 = Sign[Transpose[Accumulate[Transpose[B]]]]];
Clear[B];
Quiet[Show[
ListLinePlot[
v = ReplaceAll[
Flatten[Table[First[Position[B1[[n]], -1]], {n, 1, nn}]],
First[{}] -> 1], PlotStyle -> Blue],
Plot[Sqrt[f[n]], {n, 1, nn}, PlotStyle -> {Red, Thick}],
ImageSize -> Large]]
ListLinePlot[v/Table[Sqrt[f[n]], {n, 1, nn}]]
(*end*)
Mathematica program at pastebin:
https://pastebin.com/GJ81MQez