The class number of $\mathbb{Q}(\sqrt{82})$ is even Let $K = \mathbb{Q}(\sqrt{82})$.
I want to show that the class number $h_K$ of $K$ is even using the fact that the equation
$$ X^2 - 82Y^2 = \pm2 $$
has a solution in $\mathbb{Z}_p$ for all primes $p$ but no solution in $\mathbb{Z}$.
This is Exercise 2.2 in Swinnerton-Dyer's A Brief Guide to Algebraic Number Theory, which has already been asked here; my question is about the answer of Matt Emerton.
I thought about leaving a comment there but the question is from 2012 and Emerton has not been online since 2014 so I thought it best to ask a new question.
I don't see what links the local solutions and the class number.
The fact that there is no global solution tells us that the prime $\mathfrak{p}_2$ given by $\mathfrak{p}_2^2 = (2)$ is not principal.
Can we deduce that its order in the class group is even from the local solutions?
It turns out that the class group is cyclic of order $4$ and generated by $\mathfrak{p}_3 = (3, \sqrt{82}+1)$.
However, it seems to me (from the formulation of the exercise and the answer linked above) that the parity of $h_K$ can be deduced from the existence/nonexistence of solutions of the equation only,  without computing the full class group.
 A: The fact that $x^2 - 82y^2 = \pm 2$ does not have integral solutions implies
that the class number is not $1$. If you know in addition that $2$ ramifies in the quadratic subfield you can even conclude that the class number is even.
The fact that $x^2 - 82y^2 = \pm 2$ has local solutions everywhere (the sign doesn't matter since $9 + \sqrt{82}$ has norm $-1$) implies that the ideal class generated by the prime ideal above $2$ is in the principal genus and thus must be a square. This actually implies that the class number is divisible by $4$. Local solvability, by the way, follows almost immediately from $10^2 - 82 = 2 \cdot 3^2$ and $18^2 - 82 = 2 \cdot 11^2$.
Consider, on the other hand, the equation $x^2 - 10y^2 = 2$. As above, the fact that it does not have an integral solution implies that the class number of ${\mathbb Q}(\sqrt{10})$ is even. But this time, the equation is not solvable everywhere locally, e.g. in ${\mathbb Z}_5$; this is essentially because reduction modulo $5$ gives a contradiction. In particular, the ideal class of the prime ideal above $2$ is not a square.
The approach to genus theory via local solvability is, if I recall it correctly, presented in Hecke's excellent book on algebraic numbers.
