There is a definition of the Gram series of R(x) where R(x) is a term in the exact formula of the prime counting function defined as
$$R(x) = 1 + \sum_{k=1}^{\infty}\frac{(log(x))^k}{k!k\zeta(1+k)} $$
Which converges for all positive real x. And the prime counting function $\pi_0(x)$ is defined as
$$\pi_0(x)=R(x)-\sum_\rho R(x^\rho)-\sum_m R(x^{-2m})$$
I figured that if we plug in -2m and sum over the positive integers m first, then sum over k, basically swapping the summation, it wouldn't make much difference except that now the sum is divergent, but if I use the series definition of the zeta function I could group up the divergent sum over powers of m and rewrite the sum as
$$\sum_m R(x) = \sum_m1 + \sum_m \sum_{k=1}^{\infty}\frac{m^k(log(x^{-2}))^k}{k!k\zeta(1+k)} $$
$$\sum_m R(x) = \zeta(0) + \sum_{k=1}^{\infty}\frac{(log(x^{-2}))^k}{k!k\zeta(1+k)}\sum_m m^k $$
$$\sum_{m}R(x^{-2m}) = \zeta(0) + \sum_{k=1}^{\infty}\frac{\zeta(-k)(log(x^{-2}))^k}{k!k\zeta(1+k)} $$
And then use the reflection formula of zeta
$$\zeta(k)=\gamma(k)\zeta(1-k)$$
to cancel out the zetas inside leaving the sum as.
$$\sum_{m}R(x^{-2m}) = \zeta(0) + \sum_{k=1}^{\infty}\frac{\gamma(-k)(log(x^{-2}))^k}{k!k} $$
My question is, is this valid or even converges to the actual value? I know the argument falls apart if the Gram series of R(x) is not absolutely convergent (I only know it is convergent but I don't know if it is absolutely convergent), but I'm hoping that it would be alright.
My guess is that it probably won't converge to the correct value or even at all since there is a multitude of problems swapping sums and assigning divergent series with values willy-nilly but I don't know why it is wrong since I am incapable of rigorously doing the convergence tests and so on being basically self taught.
EDIT
So if you continue this logic, it is apparently possible to express the sum in a closed form as
$$\sum_{m}R(x^{-2m})=-\frac{1}{2}+arctan(\frac{π}{ln(x)})$$
I'm still not sure if it is at all valid to do things this way, but it is interesting that this happens, especially since I've seen approximations to the sum that are also of the order $arctan(\frac{π}{ln(x)})$