Convergence of sum of Square waves Consider the Square Wave function $f(x)$, defined for reals, as implemented in Mathematica's SquareWave[x], defined as:
$$f(x) = \frac{4}{\pi}\sum_{n = 0}^{\infty} \frac{\sin(2\pi(2n+1)x)}{2n+1} = \frac{4}{\pi}\Big(\frac{\sin(2\pi x)}{1} + \frac{\sin(6\pi x)}{3} +\frac{\sin(10\pi x)}{5} + \dots + \dots\Big)$$ Analytically, I don't know much about it, except that it is piecewise continuous with points of discontinuity at integers and half integers.
However, the function in question is not $f(x)$, but the resulting function $g(x)$ when we apply Möbius inversion to the function. Namely:
$$g(x) = \sum_{n = 0}^{\infty} \frac{\mu(2n+1)}{2n+1}f((2n+1)x) = f(x)-\frac{f(3x)}{3}-\frac{f(5x)}{5}-\frac{f(7x)}{7}- \dots$$ where $\mu(n)$ is the Möbius function from number theory.
Naively, I think that $$g(x) = \frac{4}{\pi}\sin(2\pi x)$$ but it seems counter-intuitive that a countably infinite sum of discontinuous function should equal a smooth, continuous function.
Am I right to say that they are equal? If not, where is the problem?
 A: Consider the square wave $f(x)$ defined in formula (1) below and the related real analytic representation $\tilde{f}(x)$ defined in formula (2) below.

$$f(x)=\left\{\begin{array}{cc}
 1 & 0\leq x<\frac{1}{2} \\
 -1 & \frac{1}{2}\leq x<1 \\
 f(x \bmod 1) & \text{True} \\
\end{array}\right.\tag{1}$$
$$\tilde{f}(x)=\underset{N\to\infty}{\text{lim}}\left(\frac{4}{\pi}\sum\limits_{n=1}^N a(n)\ \frac{\sin(2 \pi n x)}{n}\right),\quad a(n)=\left\{\begin{array}{cc}
 1 & (n \bmod 2)=1 \\
 0 & \text{True} \\
\end{array}\right.\tag{2}$$

Figure (1) below illustrates formula (2) for $\tilde{f}(x)$ in orange overlaid on the blue reference function $f(x)$ defined in formula (1) where formula (2) is evaluated at $N=10000$.


Figure (1): Illustration of $\tilde{f}(x)$ in orange overlaid on the blue reference function $f(x)$

Now consider the following formula for $\sin(2 \pi x)$ where $a^{-1}(n)$ is the Dirichlet inverse of $a(n)$ (see OEIS A087003).

$$\sin(2 \pi x)=\underset{N\to\infty}{\text{lim}}\left(\frac{\pi}{4}\sum\limits_{n=1}^N a^{-1}(n)\ \frac{f(n x)}{n}\right),\quad a^{-1}(n)=\left\{\begin{array}{cc}
 \mu (n) & (n \bmod 2)=1 \\
 0 & \text{True} \\
\end{array}\right.\tag{3}$$

Figure (2) below illustrates formula (3) for $\sin(2 \pi x)$ in orange overlaid on the blue reference function $\sin(2 \pi x)$ where formula (3) is evaluated at $N=10000$.


Figure (2): Illustration of formula (3) for $\sin(2 \pi x)$ in orange overlaid on the blue reference function $\sin(2 \pi x)$
