Consider the Dirichlet series counting discriminants of real quadratic fields. Quadratic field discriminants are "basically" squarefree integers, so the associated Dirichlet series $\sum D^{-s}$ is "basically" $\zeta(s)/\zeta(2s)$. However, there is the funny business at 2, and one derives the formula


$\sum D^{-s} = \frac{1}{2} \big( 4^{-s} - 1 \big) \frac{\zeta(s)}{\zeta(2s)} + \frac{1}{2} \big(1 - 4^{-s} \big) \frac{L(s, \chi\_4)}{L(2s, \chi\_4)},$


which is a wee bit messy. (This formula, and all the subsequent ones, include 1 as a "quadratic field discriminant" for convenience.)


However, I was reading a [fantastic paper](https://ncatlab.org/nlab/files/WrightIwasawaTate.pdf) by [David Wright](http://klein.math.okstate.edu/~wrightd/), where he considers positive and negative discriminants together, in which case you have the much nicer formula


$\sum |D|^{-s} = \big(1 - 2^{-s} + 2 \cdot 4^{-s} \big) \frac{\zeta(s)}{\zeta(2s)}.$


This formula is easy to derive from scratch, but he derives it as a consequence of the beautiful formula


$\sum |D|^{-s} = \prod\_p \Big( \frac{1}{2} \sum\_{[K\_v : \mathbb{Q}\_p] \leq 2} |\text{Disc}(K\_v)|^s\_p \Big).$


He uses the parameterization of quadratic fields by $\mathbb{Q}^{\times} / (\mathbb{Q}^{\times})^2$, which may be thought of as $\text{GL}\_1$-orbits on a one-dimensional prehomogeneous vector space, where $\text{GL}\_1$ acts by $t(x) = t^2 x$ rather than the usual $t(x) = tx$. He then analyzes these orbits by means of an adelic zeta function; note that with the usual action you recover Tate's thesis.


These formulas generalize quite a bit, with some complications, to $n$th-root extensions 
of any global field (with some restrictions on the characteristic). They also allow for twisting by characters, allowing (for example) a nice formula for $\sum \text{sgn}(D) |D|^{-s}.$ Note that the first formula considered looks nicer when viewed as a linear combination of $\sum |D|^{-s}$ and $\sum \text{sgn}(D) |D|^{-s}$.


The MathSciNet review says that "similar results, however, can be obtained by class field theory", and this is also hinted at in Wright's paper, but the details aren't worked out. My first question is the following.


**Is there an elegant algebraic proof of the above identity for $\sum |D|^{-s}$ and its generalizations?**


And my second question, which is essentially a vaguer version of the first one, is:


**What is the best way to think of these formulas?**


I quite like the prehomogeneous vector space approach, but I imagine there might be a nice algebraic proof as well, and in particular some kind of ``local-to-global'' principle for quadratic discriminants. I am no expert in class field theory, and I am curious if any of these identities look simple and natural when viewed in the correct light.


Thank you!



Is there an elegant algebraic proof of this formula for quadratic field discriminants?
The discriminant $D$ of a quadratic number field can be written uniquely as a product of prime discriminants, namely $-4$, $\pm 8$, and $p^\* = (-1)^{(p-1)/2}p$ for odd primes $p$.
The Dirichlet series for odd discriminants therefore simply is
$$ \sum\_{D \text{ odd}} |D|^{-s} = \prod\_{p \text{ odd}} (1 + p^{-s}), $$
and the contribution of the even prime discriminants is taken care of by the factor
$$ 1 + 4^{-s} + 2 \cdot 8^{-s}. $$
Both the beautiful as well as the much nicer formula now follow immediately.


Factorization of quadratic discriminants into prime discriminants holds over totally real algebraic number fields with class number $1$ in the strict sense (see e.g. L. Goldstein, On prime discriminants, Nagoya Math. J. 45, 119-127 (1972); J. Sunley, Remarks concerning generalized prime discriminants, Boulder 1972; J. Sunley, Prime discriminants in real quadratic fields of narrow class number one, Carbondale 1979); a weaker version good enough for the purpose of counting discriminants works if the class number in the strict sense is odd.


