# Can the Dedekind zeta function distinguish between real and imaginary quadratic number fields?

Suppose I am given a machine that gives me the coefficients $a_1$, $a_2$, $a_3$, ... of a Dirichlet series $$\sum_1^{\infty} \frac{a_n}{n^s}$$ and assume that I know that this Dirichlet series is the Dedekind zeta function of a quadratic number field. Is there any kind of algorithm which allows me to determine whether the number field is real or imaginary?

-
Not clear what you mean by an algorithm here. What is the input size? For example, you could divide your series by zeta, and get a Dirichlet L-function and then check to see if you can identify the period of those coefficients etc. Sounds like an interesting question, but it might need to be made more precise. – Lucia Feb 28 at 15:53
If you know the zeta-function of a number field $K$ "in full" then yes: this function knows the number of real and complex (i.e., non-real) embeddings of $K$. Calling these $r_1$ and $2r_2$, the order of vanishing of $\zeta_K(s)$ at a negative integer $n$ is $r_2$ if $n$ is odd and $r_1 + r_2$ if $n$ is even. The order of vanishing at 0 is $r_1 + r_2 - 1$. In particular, if $K$ is quadratic then $\zeta_K(s)$ is nonzero at negative odd integers for real $K$ and it is zero at negative odd integers for imaginary $K$. Also $\zeta_K(0) = 0$ for real $K$ and $\zeta_K(0) \not= 0$ for imaginary $K$. – KConrad Feb 28 at 15:53
Sure, if you somehow give me access to values of $\zeta_K$ then I can do it, but the machine described by Andreas Holmstrom only spits out the coefficients one at a time. – Noam D. Elkies Feb 28 at 15:55
@KConrad, thanks for the answer, but even if I can compute values of $\zeta_K$, I cannot know for sure that the value at 0 is precisely 0 and not, say $2^{-500}$. Or do we have some additional knowledge about zeta functions of quadratic number fields which implies that if the value is smaller than some bound $b$, then it really is equal to zero? – Andreas Holmstrom Feb 28 at 16:14
But maybe two values on either side of a negative even integer would work? If I compute say $\zeta_K(1.9)*\zeta_K(2.1)$, this should be strictly positive if K is real and strictly negative if K is imaginary. And in principle I can use interval arithmetic to know for sure which case we're in. But if I really want to do this, is it not a problem that I do not know the form of the functional equation? – Andreas Holmstrom Feb 28 at 16:29

Not without an upper bound on the absolute value of the discriminant $\Delta$, because any finite list of $a_n$ amounts to a congruence condition on $\Delta$ that is satisfied by infinitely many $\Delta$ of either sign.

-
Thanks Noam! So if I have an upper bound B on the discriminant, how do I actually determine whether the field is real or imaginary? And is it possible to express (in terms of B) how many a_n (or how many Euler factors) I need? – Andreas Holmstrom Feb 28 at 16:07
Will Sawin addressed the "how many $a_n$" question. Under the RH for Dirichlet L-functions, there are much better bounds on the least quadratic nonresidue, and possibly there may be a much more efficient algorithm using partial Euler products to approximate values of $L(s,\chi)$ and decide which kind of function equation it satisfies. – Noam D. Elkies Feb 28 at 20:31
[too late to edit: which kind of functional equation it satisfies.] – Noam D. Elkies Feb 29 at 4:06

Asking in terms of $B$ how many $a_n$ are needed is equivalent to asking the following question:

What is the largest $N$ such that there exists two quadratic characters $\chi_1, \chi_2$ of conductor $<B$ with $\chi_1(n)=\chi_2(n)$ for $n<N$ but $\chi_1(-1)\neq \chi_2(-1)$?

An obvious approach is to note that then $\chi= \chi_1 \chi_2^{-1}$ is a character of conductor $<B^2$ with $\chi(n)=1$ for $n<m$, which by the bound for the least quadratic nonresidue problem can only happen for $n< \left(B^2\right)^{1/4\sqrt{e}+o(1)}=B^{1/2\sqrt{e}+o(1)}$

Of course any improvement on this problem would also represent improvement on the least quadratic nonresidue problem, at least for residues modulo primes congruent to $3$ modulo $4$.

Given this many you could perform the algorithm of enumerating all the characters of conductor $<B$ and seeing which agree with your sequence.

The only efficient algorithm I see requires $B$ coefficients - you simply look to see for which primes $\chi(p)$ is $0$ (or $a_p$ is $0$ for the Dirichlet $L$-function). These are precisely the ramified primes. If you check up to $B$ you find all the ramified primes. Knowing the ramified primes determines the Dirichlet character up to multiplication by a Dirichlet character modulo $8$, since $2$ is the only prime that can be ramified in multiple different ways. Simply check the four possibilities to see which one matches the first few coefficients of your sequence.

-