# summation of oscillating functions

Consider series of the form $$S=\sum_{n\ge1}f(n)P(n)$$, where $$f$$ is some smooth function, and $$P$$ is a periodic or quasi-periodic function (e.g., $$P$$ can be a trigonometric function, so $$S$$ a Fourier series). I would like to compute $$S$$ numerically to a reasonably large number of decimals (say 50). If $$P$$ is periodic and smooth, I usually know how to do this. But otherwise, I run into problems. Consider the following two specific examples:

1) $$S_k(a)=\sum_{n\ge1}\dfrac{J_0(na)}{n^k}\;,$$ with $$J_0$$ a $$J$$-Bessel function. If $$a$$ is a rational multiple of $$\pi$$ the sum is very regular and I can compute it. Assume otherwise. When $$k\ge1$$, using the integral representation of $$J_0$$ I can compute the sum $$S_k(a)$$. But when $$k=0$$ I have no idea, although I believe that the series converges: so question 1:

Does the series $$\sum_{n\ge0}J_0(n)$$ converge, and if yes, how to compute 50 decimals of its sum ?

2) $$T_k(a)=\sum_{n\ge1}\dfrac{\{na\}-1/2}{n^k}\;.$$ This series was considered by Hecke. How to compute it numerically when $$a$$ is irrational ? Since Hecke gives some formulas when $$a$$ is quadratic, specific question 2:

is it possible to compute numerically to 50 decimals $$\sum_{n\ge1}\{na\}/n^2$$ for $$a=\pi$$, and if not, for $$a=\sqrt{2}$$ for instance ?

• $S_0(a)$ can be summed using Poisson summation formula and the fact that $J_0(x)$ is band limited, see en.wikipedia.org/wiki/Schl%C3%B6milch%27s_Series – user82588 Feb 5 at 12:15
• Thanks, this completely answers my first question. – Henri Cohen Feb 5 at 17:28
• For the second question, there might be some hope in the case $a=\sqrt{2}$ using the (very explicit) formulas for the continued fraction expansion of $\sqrt{2}$. The case $a=\pi$ seems to be much harder in this regard. – Kurisuto Asutora Feb 6 at 21:19

R.B. Paris, An expansion for the sum of a product of an exponential and a Bessel function (2019), equation (2.2): $$\sum_{n=1}^\infty J_0(na)=\frac{1}{a}-\frac{1}{2},\;\;a>0.$$ see also The evaluation of single Bessel function sums (2018).
Nemo pointed out this should further be restricted to $$0.
• Your result is wrong, see en.wikipedia.org/wiki/Schl%C3%B6milch%27s_Series . This is only valid for $0<a<2\pi$. – user82588 Feb 5 at 14:12
• thanks, at least it answers the question in the OP: "Does the series $\sum_{n=1}^\infty J_0(n)$ converge, and if yes, how to compute 50 decimals of its sum?" The answer being $1/2$. – Carlo Beenakker Feb 5 at 14:24