I realize this answer is rather lengthy and contains a considerable number of formulas, but I think a significant amount of background information is necessary to understand my answer below as the topic of Fourier series representations of prime-counting functions and functions such as $\theta(x-1)$, $\delta(x-1)$, and $\delta'(x-1)$ seems to be unfamiliar territory for most everyone but myself. Also, I think the Fourier series representations of $\theta(x-1)$, $\delta(x-1)$, and $\delta'(x-1)$ deserve some elaboration for several reasons. First, these Fourier series representations can be used with various convolution integrals to derive new formulas for a variety of functions providing new insights into functions and their relationships. Second, these Fourier series representations are closely related to the Riemann zeta function $\zeta(s)$ which is illustrated by their Mellin transforms and various other derived formulas. Finally, the Fourier series representations of $\theta(x-1)$, $\delta(x-1)$, and $\delta'(x-1)$ can be generalized to representations of $\theta(x-a)$, $\delta(x-a)$, and $\delta'(x-a)$ which can in turn be used to derive Fourier series representations of prime-counting functions and their first and second order-derivatives.
Quite some time ago I noticed what appeared to be discrepancies between the Fourier transforms of the distributional and Fourier series representations of prime-counting functions which was the motivation for this question. I was initially trying to analyze these discrepancies in the context of the Fourier series representations of the second Chebyshev function $\psi(x)$ and it's first and second-order derivatives, but I decided to shift my focus to the considerably simpler context of the Fourier series representations of $U(x)$ and it's first and second-order derivatives defined below where $\theta(x)$ is the Heaviside step function (also referred to as the Unit step function) and $\delta(x)$ is the Dirac delta function.
(1) $\quad U(x)=-1+\theta(x+1)+\theta(x-1)$
(2) $\quad U'(x)=\delta(x+1)+\delta(x-1)$
(3) $\quad U''(x)=\delta'(x+1)+\delta'(x-1)$
The Fourier series representation of $U(x)$ is derived as follows.
(4) $\quad U(x)=\sum\limits_{n=1}^\infty\mu(n)\,Floor[\frac{x}{n}]$
(5) $\quad U(x)=\sum\limits_{n=1}^\infty\mu(n)\left(\frac{x}{n}-SawtoothWave(\frac{x}{n})\right)$
(6) $\quad U(x)=\sum\limits_{n=1}^\infty\mu(n)\,\left(\frac{x}{n}-\left(\frac{1}{2}-\frac{1}{\pi}\sum\limits_{k=1}^\infty\frac{\sin\left(\frac{2\,\pi\,k\,x}{n}\right)}{k}\right)\right)$
When evaluated at finite limits, the Fourier series representation defined in formula (6) above is conditionally convergent and must be evaluated as illustrated in formula (7) below. In formula (7) and all formulas derived from it below, all $SawtoothWave$ functions under evaluation must be evaluated to the same frequency versus the same harmonic which is one of several conditional convergence requirements. The parameter $f$ controls the evaluation frequency and is assumed to be a positive integer.
(7) $\quad U(x)=\sum\limits_{n=1}^N\mu(n)\,\left(\frac{x}{n}-\left(\frac{1}{2}-\frac{1}{\pi}\sum\limits_{k=1}^{f\,n}\frac{\sin\left(\frac{2\,\pi\,k\,x}{n}\right)}{k}\right)\right)$
Formula (7) above and all functions derived from it below converge under the conditions specified in (8) below where $\mathcal{M}(N)$ is the Mertens function. When $\mathcal{M}(N)$ evaluates to zero, $U(0)$ evaluates to zero since $U(0)=-\frac{1}{2}\sum\limits_{n=1}^N\mu(n)=-\frac{1}{2}\mathcal{M}(N)$ which is the net offset of all $SawtoothWave$ functions under evaluation.
(8) $\quad\mathcal{M}(N)=0\,\land\,N\to\infty\,\land\,f\to\infty$
Assuming the conditions stated in (8) above the $\frac{1}{2}$ term in formula (7) above can be ignored and formula (7) above can be simplified to (9) below.
(9) $\quad U(x)=\sum\limits_{n=1}^N\mu(n)\,\left(\frac{x}{n}+\frac{1}{\pi}\sum\limits_{k=1}^{f\,n}\frac{\sin\left(\frac{2\,\pi\,k\,x}{n}\right)}{k}\right)$
The Fourier series representation of $U'(x)$ is defined in (10) below.
(10) $\quad U'(x)=\sum\limits_{n=1}^N\frac{\mu(n)}{n}\,\left(1+2\sum\limits_{k=1}^{f\,n}\cos\left(\frac{2\,\pi\,k\,x}{n}\right)\right)$
Assuming the conditions stated in (8) above, since $\sum\limits_{n=1}^\infty\frac{\mu(n)}{n}=\frac{1}{\zeta(1)}=0$ formulas (9) and (10) above can be simplified to (11) and (12) below.
(11) $\quad U(x)=\frac{1}{\pi}\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{\sin\left(\frac{2\,\pi\,k\,x}{n}\right)}{k}$
(12) $\quad U'(x)=2\sum\limits_{n=1}^N\frac{\mu(n)}{n}\,\sum\limits_{k=1}^{f\,n}\cos\left(\frac{2\,\pi\,k\,x}{n}\right)$
The Fourier series representation of $U''(x)$ is defined in (13) below.
(13) $\quad U''(x)=-4\,\pi\sum\limits_{n=1}^N\frac{\mu(n)}{n^2}\sum\limits_{k=1}^{f\,n}k\,\sin\left(\frac{2\,\pi\,k\,x}{n}\right)$
The following three plots illustrate the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (9), (12), and (13) above where all three functions are evaluated at $N=101$ and $f=4$. Note $\mathcal{M}(101)=0$ consistent with (8) above. The red discrete portions of the three plots below illustrate the evaluation of the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ at integer values of $x$. Formula (9) is illustrated for $U(x)$ instead of formula (11) because formula (9) converges much better at modest evaluation limits than formula (11).
The following plot illustrates the Fourier series representation of $U(x)$ defined in (9) above in blue and the distributional representation of $U(x)$ defined in (1) above in orange. Under the conditions specified in (8) above, the Fourier series representation of $U(x)$ converges to the distributional representation of $U(x)$ consistent with the Heaviside step function half-maximum convention (i.e. converges to $-\frac{1}{2}$ at $x=-1$ and to $\frac{1}{2}$ at $x=1$).

Figure (1): Illustration of Formula (9) for $U(x)$
The following plot illustrates the Fourier series representation of $U'(x)$ defined in (12) above. The first-order derivative $U'(x)$ exhibits a strict convergence at integer values of $x$. $U'(x)$ defined in (12) above always evaluates exactly to $2\,f$ at $|x|=1$ and exactly to zero at $|x|\ne 1$ for $x\in \mathbb{Z}$ and $0<|x|\le N$. The convergence of $U'(x)$ to $0$ at $x=0$ requires $\mathcal{M}(N)=0$.

Figure (2): Illustration of Formula (12) for $U'(x)$
The following plot illustrates the Fourier series representation of $U''(x)$ defined in (13) above.

Figure (3): Illustration of Formula (13) for $U''(x)$
Formulas (9) and (11) above can be integrated in the right-half plane resulting in formulas (14) and (15) below. Note that under the conditions specified in (8) above $f(x+1)$ represents the linear function $x$ for $x\ge 0$. I believe one can continue to integrate in this manner to derive a formula for $x^m$ for $x\ge 0$ and $m\in\mathbb{Z}^+$.
(14) $\quad f(x)=\int_0^x U(t)\,dt=\frac{1}{2}\sum\limits_{n=1}^N\mu(n)\left(\frac{x^2}{n}+\frac{n}{\pi^2}\sum\limits_{k=1}^{f\,n}\frac{1-\cos\left(\frac{2\,\pi\,k\,x}{n}\right)}{k^2}\right)$
(15) $\quad f(x)=\int_0^x U(t)\,dt=\frac{1}{2\,\pi^2}\sum\limits_{n=1}^N\mu(n)\, n\sum\limits_{k=1}^{f\,n}\frac{1-\cos\left(\frac{2\,\pi\,k\,x}{n}\right)}{k^2}$
The Laplace transforms of the distributional representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (1), (2), and (3) above are as follows.
(16) $\quad\mathcal{L}_x[U(x)](y)=\frac{e^{-y}}{y}\,,\quad\Re(y)>0$
(17) $\quad\mathcal{L}_x[U'(x)](y)=e^{-y}$
(18) $\quad\mathcal{L}_x[U''(x)](y)=y\,e^{-y}$
The Laplace transforms of the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (11), (12), and (13) above are as follows. Under the conditions stated in (8) above, the Laplace transforms of the Fourier series representations defined below converge to the Laplace transforms of the distributional representations for $Re(y)>0$.
(19) $\quad\mathcal{L}_x[U(x)](y)=\frac{e^{-y}}{y}=2\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\frac{1}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
(20) $\quad\mathcal{L}_x[U'(x)](y)=e^{-y}=2\,y\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\frac{1}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
(21) $\quad\mathcal{L}_x[U''(x)](y)=y\,e^{-y}=-8\,\pi ^2\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\frac{k^2}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
The Laplace transforms of the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (11), (12), and (13) above can also be written as (22), (23), and (24) below which, under the conditions stated in (8) above, also converge to the Laplace transforms of the distributional representations for $Re(y)>0$.
(22) $\quad\mathcal{L}_x[U(x)](y)=\frac{e^{-y}}{y}=-\frac{8\,\pi ^2}{y^2}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\frac{k^2}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
(23) $\quad\mathcal{L}_x[U'(x)](y)=e^{-y}=-\frac{8\,\pi ^2}{y}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\frac{k^2}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
(24) $\quad\mathcal{L}_x[U''(x)](y)=y\,e^{-y}=2\,y^2\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\frac{1}{4\pi^2\,k^2+n^2\,y^2}\,,\quad\Re(y)>0$
The distributional representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (1), (2), and (3) above all have special relationships between their Fourier transforms and inverse Fourier transforms which are illustrated below where I believe the sign is related to whether each is an odd or even function. The Fourier transforms below and all subsequent Fourier transforms assume the Fourier parameters $\{0,\,-2\pi\}$.
(25) $\quad\mathcal{FT}_x[U(x)](z)=-\mathcal{FT}_x^{-1}[U(x)](z)=-\frac{i\,\cos(2\,\pi\,z)}{\pi\,z}$
(26) $\quad\mathcal{FT}_x[U'(x)](z)=\mathcal{FT}_x^{-1}[U'(x)](z)=2\,\cos(2\,\pi\,z)$
(27) $\quad\mathcal{FT}_x[U''(x)](z)=-\mathcal{FT}_x^{-1}[U''(x)](z)=4\,i\,\pi\,z\,\cos(2\,\pi\,z)$
The $sin$ and $cos$ terms associated with the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ also have special relationships between their Fourier transforms and inverse Fourier transforms which are illustrated below.
(28) $\quad\mathcal{FT}_x\left[\sin\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](z)=-\mathcal{FT}_x^{-1}\left[\sin\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](z)=\frac{1}{2}i\,\delta\left(\frac{k}{n}+z\right)-\frac{1}{2}i\,\delta\left(\frac{k}{n}-z\right)$
(29) $\quad\mathcal{FT}_x\left[\cos\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](z)=\mathcal{FT}_x^{-1}\left[\cos\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](z)=\frac{\delta \left(\frac{k}{n}+z\right)}{2}+\frac{\delta \left(\frac{k}{n}-z\right)}{2}$
Term-wise integration of the Fourier series representation of $U(x)$, $U'(x)$, and $U''(x)$ defined in (11), (12), and (13) above implies the following Fourier transforms for the Fourier series representation of each of these functions which are obviously inconsistent with the corresponding Fourier transforms of the distributional representation defined in (25), (26), and (27) above.
(30) $\quad\mathcal{FT}_x[U(x)](z)=\frac{i}{2\,\pi}\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{\delta\left(\frac{k}{n}+z\right)-\delta\left(\frac{k}{n}-z\right)}{k}$
(31) $\quad\mathcal{FT}_x[U'(x)](z)=\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\left(\delta\left(\frac{k}{n}+z\right)+\delta\left(\frac{k}{n}-z\right)\right)$
(32) $\quad\mathcal{FT}_x[U''(x)](z)=-2\,i\,\pi\sum\limits_{n=1}^N\frac{\mu (n)}{n^2}\sum\limits_{k=1}^{f\,n}k\left(\delta\left(\frac{k}{n}+z\right)-\delta\left(\frac{k}{n}-z\right)\right)$
I believe the reason for the seeming discrepancies between the Fourier transforms of the distributional and Fourier series representations for $U(x)$, $U'(x)$, and $U''(x)$ is the idealization of the Fourier transforms of $sin$ and $cos$ functions as Dirac delta ($\delta$) functions. Note this discrepancy exists even for the Fourier transforms of the distributional and Fourier series representations of the Dirac comb. In the case of the distributional and Fourier series representations of the Dirac comb each representation transforms into the other representation which I suppose makes the discrepancy a bit easier to accept, but the case being explored here is considerably different.
The bilateral Laplace transforms of the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ don't converge for $Re(y)=0$, and consequently they cannot be evaluated at $y=2\,\pi\,i\, z$ to obtain their corresponding Fourier transforms. However, the contribution of the right and left-half planes can be evaluated at $y=2\,\pi\,i\,z+\epsilon$ and $y=2\,i\,\pi\,z-\epsilon$ respectively and summed together to approximate their corresponding Fourier transforms for $z\in\mathbb{R}$ as defined in the formulas below.
(33) $\quad\mathcal{FT}_x[U(x)](z)\approx 2\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\left(\frac{1}{(2\,\pi\,k)^2+n^2(2\,\pi\,i\,z+\epsilon)^2}-\frac{1}{(2\,\pi\,k)^2+n^2(2\,i\,\pi\,z-\epsilon)^2}\right)\,,\,z\in\mathbb{R}_{\ne 0}$
(34) $\quad\mathcal{FT}_x[U'(x)](z)\approx 2\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\left(\frac{2\,i\,\pi\,z+\epsilon}{(2\,\pi\,k)^2+n^2(2\,i\,\pi\,z+\epsilon)^2}-\frac{2\,\pi\,i\,z-\epsilon}{(2\,\pi\,k)^2+n^2(2\,\pi\,i\,z-\epsilon)^2}\right)\,,\,z\in\mathbb{R}$
(35) $\quad\mathcal{FT}_x[U''(x)](z)\approx -8\,\pi^2\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\left(\frac{k^2}{(2\,\pi\,k)^2+n^2(2\,i\,\pi\,z+\epsilon)^2}-\frac{k^2}{(2\,\pi\,k)^2+n^2(2\,\pi\,i\,z-\epsilon)^2}\right)\,,\,z\in\mathbb{R}$
The following three plots illustrate the Fourier transforms of the distributional representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (25), (26), and (27) above in blue and the approximations to the Fourier transforms of the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (33), (34), and (35) above in orange. All three plots use the same evaluation limits $N=101$, $f=4$, and $\epsilon=0.1$. The second plot below corresponds to the evaluation of the real part of the Fourier transform of $U'(x)$, and the first and third plots below correspond to the evaluations of the imaginary parts of the Fourier transforms of $U(x)$ and $U''(x)$ respectively.

Figure (4): Illustration of $\Im$ Part of Formula (33) for $\mathcal{FT}_x[U(x)](z)=-\frac{i\,\cos(2\,\pi\,z)}{\pi\,z}$

Figure (5): Illustration of $\Re$ Part of Formula (34) for $\mathcal{FT}_x[U'(x)](z)=2\,\cos(2\,\pi\,z)$

Figure (6): Illustration of $\Im$ Part of Formula (35) for $\mathcal{FT}_x[U''(x)](z)=4\,i\,\pi\,z\,\cos(2\,\pi\,z)$
The Mellin transforms of the distributional representations of $U(x)$, $U'(x)$, and $U''(x)$ defined in (1), (2), and (3) above are as follows.
(36) $\quad\mathcal{M}_x[U(x)](s)=-\frac{1}{s},\quad\Re(s)<0$
(37) $\quad\mathcal{M}_x[U'(x)](s)=1$
(38) $\quad\mathcal{M}_x[U''(x)](s)=1-s$
The Mellin transforms of the $sin$ and $cos$ terms associated with the Fourier series representations of $U(x)$, $U'(x)$, and $U''(x)$ are as follows.
(39) $\quad\mathcal{MT}_x\left[\sin\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](s)=(2\pi )^{-s}\,\sin\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\,\left(\frac{k}{n}\right)^{-s}$
(40) $\quad\mathcal{MT}_x\left[\cos\left(\frac{2\,\pi\,k\,x)}{n}\right)\right](s)=(2\,\pi)^{-s}\,\cos\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\,\left(\frac{k}{n}\right)^{-s}$
Term-wise integration of the Fourier series representation of $U(x)$, $U'(x)$, and $U''(x)$ defined in (11), (12), and (13) above implies the following Mellin transforms for the Fourier series representation of each of these functions. These transforms can be shown to be equivalent to the Mellin transforms of the distributional representations defined in (36), (37), and (38) above via analytic continuation and the definition of the Riemann zeta functional equation.
(41) $\quad\mathcal{M}_x[U(x)](s)=\frac{1}{\pi}\,(2\,\pi)^{-s}\,\sin\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\sum\limits_{n=1}^\infty\mu(n)\,\left(\frac{1}{n}\right)^{-s}\sum\limits_{k=1}^\infty k^{-1-s}$
(42) $\quad\mathcal{M}_x[U'(x)](s)=2\,(2\,\pi)^{-s}\,\cos\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\sum\limits_{n=1}^\infty\mu(n)\,\left(\frac{1}{n}\right)^{1-s}\sum\limits_{k=1}^\infty k^{-s}$
(43) $\quad\mathcal{M}_x[U''(x)](s)=-4\,\pi\,(2\,\pi)^{-s}\,\sin\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\sum\limits_{n=1}^\infty\mu(n)\,\left(\frac{1}{n}\right)^{2-s}\sum\limits_{k=1}^\infty k^{1-s}$
Formulas (44), (45), and (46) below illustrate the analytic continuations of formulas (41), (42), and (43) above are equivalent to the Mellin transforms of the distributional representations defined in (36), (37), and (38) above per the definition of the Riemann zeta functional equation. These results are achieved by replacing the sums over $n$ and $k$ in formulas (41), (42), and (43) above with their corresponding zeta functions and then simplifying using the definition of the Riemann zeta functional equation.
(44) $\quad\mathcal{M}_x[U(x)](s)=\frac{1}{\pi}\,(2\,\pi)^{-s}\,\sin\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\,\frac{\zeta(1+s)}{\zeta(-s)}=-\frac{1}{s}$
(45) $\quad\mathcal{M}_x[U'(x)](s)=2\,(2\,\pi)^{-s}\,\cos\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\,\frac{\zeta(s)}{\zeta(1-s)}=1$
(46) $\quad\mathcal{M}_x[U''(x)](s)=-2\,(2\,\pi)^{1-s}\,\sin\left(\frac{\pi\,s}{2}\right)\,\Gamma(s)\,\frac{\zeta(s-1)}{\zeta(2-s)}=1-s$
Note the Fourier series representation of $U'(x)$ represents $\delta(x-1)$ in the right-half plane and the Mellin transform $\mathcal{M}_x[\delta(x-1)](s)=1$. I'm currently investigating convergence of formulas derived from convolutions such as (47) to (49) below where the Fourier series representation of $U'(x)$ is substituted for $\delta(x-1)$ in the convolutions.
(47) $\quad g(y)=\delta(x-1)\,*_\mathcal{M_1}\,g(x)=\int_0^\infty\delta(x-1)\,g\left(\frac{y}{x}\right)\,\frac{dx}{x}$
(48) $\quad g(y)=\delta(x-1)\,*_\mathcal{M_2}\,g(x)=\int_0^\infty\delta(x-1)\,g(y\,x)\,\,dx$
(49) $\quad g(y)=\delta(x-1)\,*_\mathcal{M_3}\,g(x)=\int_0^\infty\delta(x-1)\,g(y+1-x)\,\,dx$
It's also possible to derive formulas for derivatives of functions using the Fourier series representations of the derivatives of $\delta(x-1)$ via relationships such as the following.
(50) $\quad g^{(n)}(y)=(-y)^{-n}\left(\delta^{(n)}(x-1)\,*_{\mathcal{M}_2}\,g(x)\right)=(-y)^{-n}\int_0^\infty\delta^{(n)}(x-1)\,g(y\,x)\,dx$
(51) $\quad g^{(n)}(y)=\delta^{(n)}(x-1)\,*_{\mathcal{M}_3}\,g(x)=\int_0^\infty\delta^{(n)}(x-1)\,g(y+1-x)\,dx$
An initial formula derived via a convolution such as those described above may be used to derive additional formulas for related functions via differentiation, integration, Laplace normal/inverse transforms, Mellin normal/inverse transforms, Hankel transforms, and in rare cases Fourier normal/inverse transforms.
I've derived a considerable number of formulas for a variety of functions using the techniques described above, but these formulas vary widely in complexity and a few of them don't seem to converge. The following formulas are mostly toward the simpler end of the spectrum and all seem to exhibit observational evidence of convergence under the general conditions specified in (8) above and the specific conditions specified for each formula below. The $E_m(y)$ function below (typically referred to as $E_n(y)$) is one of the more difficult functions with respect to determining convergence conditions as it's a function of two complex variables ($m$ and $y$).
(52) $\quad e^{-y}=2\,y\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\frac{1}{4\,\pi^2\,k^2+n^2\,y^2}\,,\quad\Re[y]>0$
(53) $\quad e^{-y}=-\frac{8\,\pi^2}{y}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\frac{k^2}{4\,\pi\,^2\,k^2+n^2\,y^2}\,,\quad\Re[y]>0$
(54) $\quad e^{-y}=-\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\log\left(\left(\frac{2\,\pi\,k}{n\,y}\right)^2+1\right),\quad\Re[y]>0$
(55) $\quad\log(y)=\frac{1}{\pi }\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\, n}\frac{\pi\,\sin^2\left(\frac{k\,\pi\,(y-1)}{n}\right)-\sin\left(\frac{2\,k\,\pi\,(y-1)}{n}\right)\,Ci\left(\frac{2\,k\,\pi\,(y-1)}{n}\right)+\cos\left(\frac{2\,k\,\pi\,(y-1)}{n}\right)\,Si\left(\frac{2\,k\,\pi\,(y-1)}{n}\right)}{k},\\ \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad y>1$
(56) $\quad\cos(y)=2\,e\sum\limits_{n=1}^N\mu(n)\,n\sum\limits_{k=1}^{f\,n}\frac{n^2\,\left(y^2+1\right)+4\,\pi^2\,k^2}{\left(n^2\,\left(y^2-1\right)-4\,\pi^2\,k^2\right)^2+4\, n^4\,y^2},\quad y\in\mathbb{R}$
(57) $\quad\sin(y)=4\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{\pi\,k\,\sin (y+1)\,\sin \left(\frac{2\,\pi^2\,k}{n}\right)-n \cos (y+1) \cos ^2\left(\frac{\pi^2\,k}{n}\right)}{n^2-4\,\pi ^2\,k^2},\quad Re(y)\ne 0\lor y=0$
(58) $\quad sinc(y)=\frac{\sin (y)}{y}=2\,e\sum\limits_{n=1}^N\mu (n)\,n\sum\limits_{k=1}^{f n}\frac{n^2\,\left(y^2+1\right)-4\,\pi^2\,k^2}{\left(n^2\,\left(y^2-1\right)-4\,\pi^2\,k^2\right)^2+4\,n^4\, y^2},\quad y\in\mathbb{R}$
(59) $\quad sech(y)=\frac{\pi}{y}\sum\limits_{n=1}^{N}\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n} sech\left(\frac{k\,\pi^2}{n\,y}\right),\quad\Re(y)>0$
(60) $\quad erf(y)=\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\Gamma\left(0,\frac{k^2\,\pi^2}{n^2\,y^2}\right)\,,\quad\Re(y)>0$
(61) $\quad erfc(y)=1-erf(y)=2\,\pi^{-3/2}\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{F\left(\frac{k\,\pi}{n\,y}\right)}{k}\,,\quad\Re(y)>0$
(62) $\quad F(y)=\frac{1}{2}\pi^{3/2}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n} erfc\left(\frac{\pi\, k}{n\,y}\right)\,,\quad y\in\mathbb{R}\quad\text{(Dawson function)}$
(63) $\quad K_0(y)=\pi\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{1}{\sqrt{4\,\pi^2\,k^2+n^2\,y^2}}\,,\quad\Re(y)>0$
(64) $\quad Si(y)=-\pi\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\left(
\begin{array}{cc}
\{ &
\begin{array}{cc}
\log\left(\frac{2\,k\,\pi}{n\,y}\right) & 2\,k\,\pi<n\,y \\
0 & \text{True} \\
\end{array}
\\
\end{array}
\right),\quad y>0$
(65) $\quad Ei(y)=-\frac{1}{2\,\pi}\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n} \frac{\pi+2\,\cot^{-1}\left(\frac{2\,\pi\,k}{n\,y}\right)}{k},\quad y<0$
(66) $\quad E_1(y)=\frac{1}{\pi}\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\frac{\tan ^{-1}\left(\frac{2\,\pi\,k}{n\,y}\right)}{k},\quad Re[y]>0$
(67) $\quad E_m(y)=\frac{2}{m\,y}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\,_2F_1\left(1,\frac{m}{2};\frac{m+2}{2};-\left(\frac{2\,\pi\,k}{n\,y}\right)^2\right),\\$ $\qquad\qquad\qquad\qquad\Re(y)>0\,\land\,\Re(m)\geq 0\,\land\,m\neq 0$
(68) $\quad\frac{1}{\Gamma[s]}=e\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\left(\left(1+\frac{2\,i\,\pi\,k}{n}\right)^{-s}+\left(1-\frac{2\,i\,\pi\,k}{n}\right)^{-s}\right),\quad\Re[s]>0$
(69) $\quad\Gamma(0,\,s)=e\sum\limits _{n=1}^N\mu(n)\sum\limits_{k=1}^{f\,n}\left(\frac{\log\left(1+\frac{n+2\,i\,\pi\,k}{n\,s}\right)}{n+2\,i\,\pi\,k}+\frac{\log \left(1+\frac{n-2\,i\,\pi\,k}{n\,s}\right)}{n-2\,i\,\pi\,k}\right),\quad s>0$
(70) $\quad\Gamma[s]=e\,\pi\,\csc\,(\pi\,s)\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\,n}\left(\left(\frac{n}{n+2\,i\,\pi\,k}\right)^{1-s}+\left(\frac{n}{n-2\,i\,\pi\,k}\right)^{1-s}\right),\quad-1<\Re(s)<1$
I typically use $f=4$ for evaluation plots as most of the formulas are much more sensitive to the magnitude of $N$ than they are to the magnitude of $f$. I'd appreciate feedback anyone might have with respect to convergence of these formulas.
The Fourier series representation of $U(x)$ is an example of what I refer to as a method 1 Fourier series. Similar Fourier series can be derived for the log-step staircase function $T(x)$ and prime-counting functions such as the base prime-counting function $\pi(x)$, Riemann's prime-power counting function $\Pi(x)$, the first Chebyshev function $\vartheta(x)$, and the second Chebyshev function $\psi(x)$.
Assuming $a\in\mathbb{R}$, the $U(x)$ function can be shifted by subtraction of parameters as illustrated in (71) below. Formula (71) below evaluates to $\theta(x-a)$ for $x\ge a-1$. This representations of $\theta(x-a)$ is the basis for what I refer to as the method 2 Fourier series representation of prime-counting functions. Since both $\theta$ functions move in the same direction when shifting $U(x)$ via subtraction of parameters, the lower evaluation bound must be restricted to $x\ge a-1$ when evaluating $U(x-(a-1))$ to avoid contribution of the $\theta$ function originally in the left-half plane.
(71) $\quad U(x-(a-1))=-1+\theta(x-(a-1)+1)+\theta(x-(a-1)-1)\\$
$\qquad\qquad\qquad\qquad\qquad=-1+\theta(x-(a-2))+\theta(x-a)$
Assuming $a\in\mathbb{R}$ and $a>1$, the $U(x)$ function can also be shifted by division of parameters as illustrated in (72) below. Formula (72) below evaluates to $\theta(x-a)$ for $x\ge 0$. This representation of $\theta(x-a)$ is the basis for what I refer to as the method 3 Fourier series representation of prime-counting functions. Note that in this case the two $\theta$ functions move in opposite directions (since $a>1$), and the $\theta$ function in the left-half plane can be ignored when evaluating formulas for $x\ge 0$ which is the primary interest with respect to evaluation of formulas related to prime-counting functions.
(72) $\quad U\left(\frac{x}{a}\right)=-1+\theta\left(\frac{x}{a}+1\right)+\theta\left(\frac{x}{a}-1\right)=-1+\theta(x+a)+\theta(x-a)$
Method 3 has the advantage over method 2 that it's not necessary to restrict the lower evaluation bound when evaluating $\theta(x-a)$, but has the disadvantage that conditional convergence becomes a bit more complicated. Additional terms must be evaluated in order to obtain convergence, and this leads to longer evaluation times.
The following three plots illustrate method 1, method 2, and method 3 Fourier series representations related to the first-order derivative $\psi'(x)$ of the second Chebyshev function. The method 1 representation in the first plot is for $\psi'(x)-1$, whereas the method 2 and method 3 representations illustrated in the second and third plots are both for $\psi'(x)$. All three plots are evaluated at $f=4$. The orange curve illustrated in the plots is the reference function $2\,f\log(x)$ and the horizontal dashed grid-lines are at $2\,f\log(2)$ and $2\,f\log(3)$. The red discrete portions of the plots illustrate all three Fourier series representations exhibit the same strict convergence to exactly to $2\,f$ times the step size of $\psi(x)$ at positive integer values of $x$.
$\psi'(x)-1$" />
Figure (7): Illustration of Method 1 Fourier Series Representation of $\psi(x)-1$
$\psi'(x)$" />
Figure (8): Illustration of Method 2 Fourier Series Representation of $\psi(x)$
$\psi'(x)$" />
Figure (9): Illustration of Method 3 Fourier Series Representation of $\psi(x)$
Personally I find the method 2 and method 3 Fourier series representations of prime-counting functions somewhat artificial compared with the method 1 Fourier series representation. The method 2 Fourier series representation seems particularly artificial to me since it requires a different lower evaluation bound be used to evaluate each different instance of $\theta(x-a)$.