Why does the equation $x^2-82y^2=\pm2$ have solutions in every $\mathbb{Z}_p$ but not in $\mathbb{Z}$?

I have been working on an exercise in H. P. F. Swinnerton-Dyer's book, A Brief Guide to Algebraic Number Theory. The question is like this:

Show that $x^2-82y^2=\pm2$ has solutions in every $\mathbb{Z}_p$ but not in $\mathbb{Z}$.What conclusion can you draw about $\mathbb{Q}(\sqrt{82})$?

I thought it might be solved by using the Hensel's lemma. But I can't give an answer.

Thanks in advance!


That there are no solutions in $\mathbb Z$ can be shown by noting that for any positive solution, you'd have:

$$|x/y-\sqrt{82}| = \frac{2}{y^2(x/y+\sqrt{82})}<\frac{1}{4y^2}$$

Use this to show that $x/y$ is in the continued fraction expansion of $\sqrt{82}$. But, for the continued fraction expansion, $p_n/q_n$ of $\sqrt{D}$, in general, $p_n^2-Dq_n^2$ is a periodic sequence, and you only need to check up to the first case when $p_n^2-Dq_n^2=\pm 1$. In this case,that's the very first term of the continued fraction expansion of $\sqrt{82}$.


Detail of my comment:

The equation has an equivalent form $x^2y^{-2}\pm2y^{-2}=82$. It is obvious that $u^2\pm2v^2=82$ has integral solutions when $v=3$. Let $y^{-1}\equiv v(\mod{p})$ and $xy^{-1}\equiv u(\mod{p})$, and we have constructed solutions for every prime number $p>3$.


This is more a hint since I unfortunately don't have much time, but I think this should do the job for odd primes.

For a henselian local ring $R$ with $2\in R^*$ and residue field $k$ we have $R^*/R^{2*}\cong k^*/k^{2*}$.

The composition of projections \begin{equation*} R^*\twoheadrightarrow (R/\mathfrak m)^*\cong k^*\twoheadrightarrow k^*/k^{2*} \end{equation*} is surjective. An element $a$ is in the kernel of the composition map if its image $x$ is a square in $k^*$, say $x=y^2$. But then the polynomial $T^2-x\in k[T]$ factors as $(T-y)(T+y)$, which may then be lifted to $T^2-a=(T-b)(T+b)\in R[T]$. (Note that we need char $k\neq 2\Leftrightarrow (T-y)$ and $(T+y)$ are coprime.) Clearly $b^2=a$ and $b$ is a unit, hence $a\in R^{2*}$. We conclude that the above map factors through an isomorphism $R^*/R^{2*}\cong k^*/k^{2*}$.

Therefore the problem can be reduced from $\mathbb Z_p$ to $\mathbb Z/p$. There some version of the quadratic reciprocity law should do.


Regarding the last part of the question, this tells you that the principal genus of discriminant $328$ contains a non-trivial class, and hence that the class number of $\mathbb Q(\sqrt{82})$ is divisible by $2$.