A curious identity on $\sum _{n=0}^{\infty } \frac{(-1)^n \cos \left(2 \pi \sqrt{2 n+1}\right)}{\sqrt{2 n+1}}$

This, as well as a similar one $$\sqrt{2}\sum_{n\geq 0} \frac{(-1)^n \sin(\frac{2\pi}{2n+1}+\frac{\pi}{4})}{\sqrt{2n+1}} = \sum_{n\geq 0} \frac{(-1)^n}{\sqrt{2n+1}}\left[\sin(2\pi\sqrt{2n+1})+e^{-2\pi\sqrt{2n+1}}\right]$$ follows from Poisson summation formula.


Let $$f(x) = \begin{cases}\frac{1}{\sqrt{x}}e^{i(2\pi/x+\pi/4)} \qquad &x> 0 \\ 0 \qquad &x\leq0\end{cases}$$ Then the Fourier transform of $f$ is $$\hat{f}(\xi) = \int_0^\infty \frac{1}{\sqrt{x}}e^{i(2\pi/x+\pi/4)}e^{-2\pi i x \xi} dx =\begin{cases} \frac{e^{-4\pi \sqrt{\xi}}}{\sqrt{2\xi}} \qquad &\xi > 0 \\ \frac{i}{\sqrt{2}}\frac{e^{4\pi i \sqrt{-\xi}}}{\sqrt{-\xi}} \qquad &\xi < 0 \end{cases}$$ The last integral can be calculated via substitution $x \to t^2$ and usage of the fact that $\int_\mathbb{R} g(t-a/t) dt= \int_\mathbb{R} g(t) dt$ for $a>0$ (or Cauchy-Schlomilch formula).

Denote $g(x) = f(x)e^{-\pi i x/2}$, then $\hat{g}(\xi)=\hat{f}(\xi+\frac{1}{4})$. By Poisson summation and a simple scaling, we have that $\sum_{n\in \mathbb{Z}}g(n)=\sum_{n\in \mathbb{Z}}\hat{g}(n),\sum_{n\in \mathbb{Z}}g(2n)=2\sum_{n\in \mathbb{Z}}\hat{g}(\frac{n}{2})$, now take difference gives: \begin{aligned}\sum_{n\in \mathbb{Z}} g(2n+1) &= \sum_{n\in \mathbb{Z}}\frac{(-1)^n}{2}\hat{g}(\frac{n}{2})\\ \iff \sum_{n\geq 0} \frac{(-1)^n}{\sqrt{2n+1}}\exp(\frac{2\pi i}{2n+1}+\frac{\pi i}{4}) &= \frac{1}{\sqrt{2}}\sum_{n\in \mathbb{Z}}\frac{(-1)^n}{\sqrt{2n+1}}e^{2\pi i \sqrt{2n+1}}\end{aligned} completing the proof (in the last step, note that $g(k)$ vanishes when $k\leq 0$).


Both sides of the cosine series converge quite slowly. But integrating $$\frac{\cos{2\pi \sqrt{z}}}{\sqrt{z}}\sec(\frac{\pi z}{2})$$ around imaginary axis gives (with $\zeta = e^{\pi i/4}$), $$\sum _{n=0}^{\infty } \frac{(-1)^n \cos \left(2 \pi \sqrt{2 n+1}\right)}{\sqrt{2 n+1}} = \int_0^\infty \frac{\Re[\zeta^{-1} \cos(2\pi x \zeta)]}{\cosh \frac{\pi x^2}{2}}dx$$ the integral converges very fast, yielding its value to high accuracy:

1.565610752873397833860829626940435825071307905657536415700...

For information about such sums

Let $r_2(n)$ be the number of representations of $n=0,1,2,\ldots$ in the form $$ A^2+B^2=n, $$ where $A,B$ integers. Then $$ r_2(0)=1\textrm{, }r_2(n)=4\sum_{d|n,d-odd}(-1)^{(d-1)/2}. $$ The Gauss circle problem (conjecture) states that if $$ R(x)=\frac{1}{x^{1/4}}\left(\sum_{n\leq x}r_{2}(n)-\pi x\right), $$ then $\forall \epsilon>0$ $$ R(x)=O(x^{\epsilon})\textrm{, }x\rightarrow+\infty. $$ This is equivalent to show: If $$ S_{N_1}(x)=\sum_{n(2l-1)\leq N_1}\frac{(-1)^{l-1}\cos \left(2\pi\sqrt{n(2l-1)x}+\frac{\pi}{4}\right)}{(n(2l-1))^{3/4}}= $$ \begin{equation} =\sum^{N_1}_{n=1}\frac{r_2(n)\cos\left(2\pi\sqrt{nx}+\frac{\pi}{4}\right)}{n^{3/4}}, \end{equation} then $$ \lim_{N_1\rightarrow\infty}S_{N_1}(x)=O\left(x^{\epsilon}\right)\textrm{, }\forall\epsilon>0\textrm{, }x\rightarrow+\infty $$ see here

However the problem needs more research.