Asymptotics for an exponential sum I am trying to find an equivalent of : $\displaystyle{S_n=\sum_{k=1}^n}e^{i\sqrt k}$
I tried to elucidate the asymptotic behaviour of the subsequence :
$$S_{n^2-1}=\sum_{k=1}^{n^2-1}e^{i\sqrt k}=\sum_{q=1}^{n-1}\sum_{k=q^2}^{(q+1)^2-1}e^{i\sqrt k}$$
The idea was that the $q-th$ chunk :
$$C_q=\sum_{k=q^2}^{(q+1)^2-1}e^{i\sqrt k}$$
would behave like $\displaystyle{(2q+1)e^{iq}}$ but this hasn't been conclusive.
Maybe comparing the sum with an integral would be the key ?
Any help would be appreciated ...
I guess there are general results regarding sum of "slowly varying exponentials" ...
 A: Partial solution
An usual method is to find telescoping series $\sum_k(u_{k+1}-u_u)$ such that the series $\sum_k (u_{k+1}-u_k-e^{i\sqrt{k}})$ converges. Then, the sequence $(u_{n+1} - \sum_{k=1}^n e^{i\sqrt{k}})_{n \ge 1}$ converges.
Comparison with an integral provides ideas to find such a telescoping series, although comparison does not apply in our situation.
We hope that $e^{i\sqrt{k}}$ is close to $\int_k^{k+1} e^{i\sqrt{x}} \mathrm{d}x$, which can be viewed as the general term of a telescoping series. Unfortunately, wedo not have explicit primitive of $x \mapsto e^{i\sqrt{x}}$. Yet, we have
$$\frac{d}{dx}(e^{i\sqrt{x}}) = \frac{i}{2\sqrt{x}} e^{i\sqrt{x}},$$
and
$$\frac{d}{dx}\big(-2i\sqrt{x}e^{i\sqrt{x}}\big) = \frac{-i}{\sqrt{x}}e^{i\sqrt{x}} + e^{i\sqrt{x}}.$$
We hope that the function $x \mapsto -2i\sqrt{x}e^{i\sqrt{x}}$ is close to a primitive $x \mapsto e^{i\sqrt{x}}$.
This gives us to consider $u_k := -2i\sqrt{k}e^{i\sqrt{k}}$. We have $$u_{k+1}-u_k-e^{i\sqrt{k}} 
= \sqrt{k}e^{i\sqrt{k}}\Big(-2i\sqrt{1+\frac{1}{k}}e^{i(\sqrt{k+1}-\sqrt{k})} +2i - \frac{1}{\sqrt{k}}\Big)$$
Then we use
$$\sqrt{1+\frac{1}{k}} = 1+\frac{1}{2k}1-\frac{3}{8k^2}+O\Big(\frac{1}{k^3}\Big),$$
$$\sqrt{k+1}-\sqrt{k} = \sqrt{k}\Big(\sqrt{1+\frac{1}{k}} - 1\Big)
= \frac{1}{2\sqrt{k}}-\frac{3}{8k^{3/2}}+O\Big(\frac{1}{k^{5/2}}\Big),$$
$$e^{i(\sqrt{k+1}-\sqrt{k})} = 1+\frac{i}{2\sqrt{k}}-\frac{1}{8k}-\frac{19i}{48k^{3/2}}+O\Big(\frac{1}{k^2}\Big)$$
Putting things together, we get (if my computations are correct).
$$u_{k+1}-u_k-e^{i\sqrt{k}} = e^{i\sqrt{k}}\Big( \frac{a}{\sqrt{k}}-\frac{b}{k}\Big)+O\Big(\frac{1}{k^{3/2}}\Big).$$
We are led to study the series $\sum_k e^{i\sqrt{k}}\frac{1}{\sqrt{k}}$ and $\sum_k e^{i\sqrt{k}}\frac{1}{k}$, and to repeat the operations, to get series whose general terms tends faster to $0$...
