I would like to code Riemann Zeta function in Scilab. Even if I would only need computation for real arguments, I tried to code a fully operational function for complex argument (hoping it can help anyone…). I based my code on previous exchanges referring to this paper indicating P.Borwein process.
$$\zeta(s)=\frac{1}{d_0(1-2^{1-s})}\sum_{k=1}^{n}\frac{(-1)^{k-1}d_k}{k^s}+\gamma_n(s)$$ with $$d_k=n\sum_{j=k}^{n}\frac{(n+j-1)!4^j}{(n-j)!(2j)!}$$ and by noting $s=\sigma+it$ $$\left | \gamma_n(s) \right |\leq \frac{3}{(2+\sqrt8)^n} \frac{(1+2\left | t \right |)e^{\left | t \right |\pi/2}}{\left | 1-2^{1-s} \right |}$$
This computation is really efficient but the amount of terms according to residual error is only valid for $\Re(s)\geq \frac{1}{2}$.
Another computation is also described in the paper with the residual error maximization available for $\Re(s)>0$ or $\Re(s)<0$.
However, when $s\approx 1+p \cdot \frac{2\pi i}{log(2)}$, the functional equation cannot be used to reflect to a computable argument: real part is $0$ or to close to ensure accurate computation... Well it seems I cannot use this fast computation process for these arguments.
I found on Wikipedia (French) the orientation to compute $\frac{1}{\zeta(s)}$, and also the following more complexe alternating series, that I also read in this document or D.V. Widder, Laplace Transform book.
$$\zeta(s)=\frac{1}{1-3^{1-s}}\sum_{n=1}^{\infty}\left ( \frac{1}{(3n-2)^s} + \frac{1}{(3n-1)^s} -\frac{2}{(3n)^s}\right )$$
It looks like promising but no orientation as P.Borwein with Chebychev polynomials. I did not succeed in identifying any paper, so if anyone can help…
Does a similar fast method with error evaluation exist for this expression? If no, I guess that Euler Maclaurin summation method will work but I will need to investigate it to understand.
Thanks in advance!