Let the Dirichlet inverse of the Euler totient function be:
$$\vartheta(n) = \sum\limits_{d|n} d \cdot \mu(d) \tag{1}$$
and compute the sum:
$$q(x,n)=\sum _{h=0}^{\infty } \left(\sum _{k=1}^n x^{h n+k} \vartheta(\gcd (n,k))\right)$$
This is a sequence of ratios of polynomials:
$$q(x,1,2,3,...)=\frac{x}{1-x},\frac{x}{x+1},\frac{2 x^2+x}{x^2+x+1},\frac{x}{x+1},\frac{4 x^4+3 x^3+2 x^2+x}{x^4+x^3+x^2+x+1},\frac{x-2 x^2}{x^2-x+1},\frac{6 x^6+5 x^5+4 x^4+3 x^3+2 x^2+x}{x^6+x^5+x^4+x^3+x^2+x+1},\frac{x}{x+1},\frac{2 x^2+x}{x^2+x+1},\frac{-4 x^4+3 x^3-2 x^2+x}{x^4-x^3+x^2-x+1},...$$
Compute the roots of the polynomials in the denominators with Mathematica:
Solve[q[[n]]^-1 == 0, x]
Then sum the first half of the set of roots: $w_1,w_2,w_3,...w_{m}$ for each polynomial, where $m=$ the number of roots in the polynomial.
So if $m=6$ then we sum only: $w_1+w_2+w_3$ since $m/2=3$, which is the first half of the set of roots for that polynomial.
Apart from sign (-1)^(PrimeNu[n]) (PrimeNu[n] = https://oeis.org/A001221) and apart from powers of two where $m=1$ (and 1 divided by 2 is 1/2) we get the list:
$$\begin{array}{l} \text{List} \\ \text{List} \\ 0.50000000000000000000+0.86602540378443864676 i \\ \text{List} \\ 0.5000000000000000000-0.3632712640026804429 i \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000+0.6269801688313519188 i \\ \text{List} \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000-0.3632712640026804429 i \\ 0.5000000000000000000+0.5770307602665047603 i \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000-0.4429613468217111401 i \\ 0.5000000000000000000+0.6269801688313519188 i \\ 0.5000000000000000000-0.0525521176328382313 i \\ \text{List} \\ 0.5000000000000000000-0.4558102263368222988 i \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000+0.5431447875564560567 i \\ 0.5000000000000000000-0.3632712640026804429 i \\ 0.5000000000000000000+1.9569377743528168113 i \\ 0.5000000000000000000+0.5770307602665047603 i \\ 0.5000000000000000000+0.5353692760330624875 i \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000-0.3632712640026804429 i \\ 0.5000000000000000000-0.4429613468217111401 i \\ 0.50000000000000000000+0.86602540378443864676 i \\ 0.5000000000000000000+0.6269801688313519188 i \\ 0.5000000000000000000-0.4736251578034851021 i \\ 0.5000000000000000000-0.0525521176328382313 i \\ 0.500000000000000000+0.525999701263957011 i \\ \text{List} \end{array}$$
with the following Mathematica program:
Clear[s, x, a, t, q];
nn = 32;
a[n_] := Total[Divisors[n]*MoebiusMu[Divisors[n]]]; Monitor[
q = Table[
Sum[Sum[a[GCD[n, k]]*x^(n*h + k), {k, 1, n}], {h, 0,
Infinity}], {n, 1,
nn}];, n]; table =
Table[Chop[Accumulate[N[x /. Solve[q[[n]]^-1 == 0, x], 20]]]*(-1)^
PrimeNu[n], {n, 1, nn}]; (table2 =
Table[table[[n]][[Floor[Length[table[[n]]]/2]]], {n, 1,
Length[table]}]) // Column
Question:
Show that this list of complex numbers always has real part = $\frac{1}{2}$ whenever $n$ is not a power of $2$.
Monitor[TableForm[Table[N[Total[(x /.Solve[Sum[(-1)^n*x^n, {n, 0, 2*k}] == 0, x])[[Range[k]]]], 20], {k, 1, 12}]], n]$$\begin{array}{l} 0.50000000000000000000+0.86602540378443864676 i \ 0.50000000000000000000-0.36327126400268044295 i \ 0.50000000000000000000+0.62698016883135191879 i \ 0.50000000000000000000-0.41954981558864000588 i \ 0.50000000000000000000+0.57703076026650476034 i \ 0.50000000000000000000-0.44296134682171114007 i \ \end{array}$$ – Mats Granvik Oct 09 '23 at 12:34TableForm[N[Table[Sum[(-1)^(k + 1) (-1)^(k/(2*n + 1)), {k, 1, n}], {n, 1, 6}]]]$$\begin{array}{l} 0.50000000000000000000+0.86602540378443864676 i \ 0.50000000000000000000-0.36327126400268044295 i \ 0.50000000000000000000+0.62698016883135191879 i \ 0.50000000000000000000-0.41954981558864000588 i \ 0.50000000000000000000+0.57703076026650476034 i \ 0.50000000000000000000-0.44296134682171114007 i \end{array}$$ – Mats Granvik Oct 16 '23 at 19:03