I was reading the explanation about using the combination of Riemann's $R(x)$, Riemann Zeta Function and the zeros of the Riemann zeta function to make an accurate description of the prime counting function $\pi(x)$ in here https://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/encoding1.htm
The formulas that I based my implementation on are as follows: $$R(x)=1+\sum_{k=1}^{\infty}\frac{(\ln x)^{k}}{kk!\zeta(k+1)}$$
Then the prime counting function can be defined as
$$\pi(x)=R(x)-\sum_{m=1}^{\infty}R(x^{-2m})+\sum_{k=1}^{\infty}T_{k}(x)$$
where the
$$T_{k}(x)=-R(x^{\rho_{k}})-R(x^{\rho_{-k}})$$ The $\rho_{k}$ and $\rho_{-k}$ in turn are the $k^{th}$ zero of Riemann Zeta function and its conjugate.
We can now define the sequence of functions $R_n(x)$ which approximate $\pi(x)$ in the limit: $$R_{n}(x)=R(x)-\sum_{m=1}^{\infty}R(x^{-2m})+\sum_{k=1}^{n}T_{k}(x)$$ specifically let us truncate the series of $T_k(x)$ to 10 term: $$R_{10}(x)=R(x)-\sum_{m=1}^{\infty}R(x^{-2m})+\sum_{k=1}^{10}T_{k}(x)$$
Now, the way I implemented the formulae in Wolfram Mathematica is as follows:
R[x_] := N[1 + Sum[(Log[x])^k/(k*k!*Zeta[k + 1]), {k, 1, 17}]]
(The "N" here forces Mathematica to render a numerical, approximate expression) Then
Tkx[k_, x_] := Re[-R[x^ZetaZero[k]] - R[x^ZetaZero[-k]]]
$$\text{Rn}[\text{x$\_$}]\text{:=}\sum _{k=1}^{10} \text{Tkx}[k,x]-\sum _{m=1}^{20} \text{R}\left[x^{-2 m}\right]+\text{R}[x]$$ Notice that I truncated both series, so that I could see some results faster, and see if they indeed converge, the way I implemented them. However, upon using those functions I got, for example:
$N[Rn[100]] = 8.16729 \times 10^{22}$
Definitely not the result I expected, which was to show the approximation to $\pi(x)$. Also,
Tkx$[10, 100] =4.23018,$
which I am not sure if this last number is correct either, because I couldn't find a reference to check it (including Harold Edwards' "Riemann Zeta Function"). What I wish to achieve is to be able to reproduce the animation of successive approximations of $\pi(x)$, adding a new term from my Tkx, as it is shown in https://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/encoding1.htm
Is my interpretation of those formulas lacking something, or have I missed something from the explanation in https://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/encoding1.htm ? In here what interest me the most is the actual implementation of Tkx (what I think could be called "correction" terms, for lack of a better name).