TITLE: Error term of a Tauberian theorem and lattice points in circles
QUESTION [5 upvotes]: Suppose $\{a_n\}$ is a sequence of non-negative real numbers, $a_n = O(n^M)$ for a positive number $M$ and it's Dirichlet series $L(s)=\sum \frac{a_n}{n^s}$ has an analytic continuation to a meromorphic function on $\mathbb C$ with only a simple pole at a positive real number $a$ with residue $A$. Using a standard Tauberian theorem (if I'm not forgot a necessary condition) one can conclude that:
$$\sum_{n\leq x} a_n = Ax^a + O(x^{a-\delta}). $$
My question is:

What is the maximum value of $\delta$ for which the above asymptotic formula works?

My motivation for this question was an effort to finding out the asymptotic of the number of lattice points in a circle with radius $\sqrt{N}$ with center at the origin which is closely related with Dedekind zeta function of $\mathbb Q[i]$. It turns out that this zeta function satisfies all of the above conditions for $a=1$ and $A=\frac{\pi}{4}$. So what is the best result one can obtain in this way?

REPLY [3 votes]: answer to the second question of Mostafa:(1). One can get the estimate $$\frac{\pi}{4}R+O(R^{1/2})$$ only by a short and elementary argument-people refer to it as the sphere packing technique of Gauss, you might have seen it is Calculus 1-essentially it is two dimensional Riemann integration where instead of approximating the integral with many arbitrarily small boxes you approximate it with a few squares of side $1$. Having therefore obtained the values $\delta=\frac{1}{2}$ so easily the question about Perron's formula is whether it can get a larger $\delta$. This is why I thought the first testing point would be at $\sigma=\frac{1}{2}$, as I mentioned earlier shifting the line of integration to the right and on $\Re(s)=\sigma$ will provide an error term which is at least as large as $O(x^{\sigma})$, the reason being the $x^s$ term in $$\int \zeta_{\mathbb{Q}(i)}(s) \frac{x^s}{s} ds.$$
(2): Indeed one can get $O(R^{1/3})$ using Voronoi summation-a smooth exposition of this proof (among many others) is Iwaniec+Kowalski's book (Lemma 4.9). Actually getting $O(R^{1/3})$ is the whole point of this approach compared to contour integration. Mind you, one can do contour integration and get this good error term but one needs a new idea, namely the approximate functional equation (have a look at Titchmarsh's zeta function book). But I should still say that the exponent $1/3$ is rather easy to get and one should try to read Huxley's papers instead (or at least the earlier delta symbol method of Iwaniec+Mozocci) that gives exponents much closer to Hardy's conjecture $\frac{1}{4}$.