TITLE: Prove that if neither $a$ nor $-a$ are squares modulo $d$, then no integral ideal in $K$ of norm $a$ is principal.
QUESTION [8 upvotes]: Let $K=\mathbb{Q}(\sqrt{d})$ where $d \neq 0,1$ is a squarefree integer.
Let $a \in \mathbb{Z}$. Prove that if neither $a$ nor $-a$ are squares modulo $d$, then no integral ideal in $K$ of norm $a$ is principal.
Hint: Consider cases disk $K=d$ and disc $K=4d$.
For the case disk $K=d$, we have $\mathbb{Z}_k=\mathbb{Z}[\alpha]$ where $\alpha=\frac{1+\sqrt{d}}{2}$. The norm of a general element $x+y\alpha$ is $(x+y/2)^2-d(y/2)^2$.
I suppose $(d/a)=-1$. I am now stuck. Any help?

REPLY [4 votes]: Your hypotheses are a bit muddled. On the one hand you assume that $\pm a$ is not a square mod $d$ , and on the other you write $(d/a) = -1$, i.e., if $a$ is prime, that $d$ is not a square mod $a$. So let us try to clear up the necessary requirements as we go along. 
First you speak of ideals $I$ of the ring of integers $A$ of your quadratic field $K = \mathbf Q (\sqrt d)$ with norm $a \in \mathbf Z$. There are at least two definitions of $N(I)$. The first one is $N(I)$ is the order of the quotient $A/I$, which implies that $a$ must be a natural integer.
If you consider $a \in \mathbf Z$, then the definition should be: $N(I)$ and $a$ generate the same ideal in $\mathbf Z$, in which case the sign of $a$ becomes irrelevant. But then you could also consider the ideals generated in $A$, in which case the definition becomes $aA$ is the product of all the distinct Galois conjugates of $I$, see the answer to this question about norms and ideals.
Let us stick to the latter definition. Because the norm is multiplicative, we can assume that $a$ is a rational prime $p$. Then the theory of the decomposition of primes in a quadratic field tells you that $p$ is a norm iff $p$ splits, i.e. $pA = P.P'$, where $P$ and $P'$ are two conjugate prime ideals of $A$, if and only if $(d/p) = 1$ if $p$ is odd, and $d \equiv 1 \bmod 8$ if $p=2$. At this stage :

if your main hypothesis is $(d/p) = -1$ for $p$ odd, then the case $p = 2$ requires further examination. The point is that $A$ does not necessarily coincide with $B = \mathbf Z [\sqrt d]$ (see the hint on $\textrm{disc}(K)$). An easy calculation shows that $A/pA = B/pB$ if $p$ is odd, but the case $p = 2$ requires more tedious computation to obtain the criterion that $2$ splits if and only if $d \equiv 1$ mod $8$. Anyway, it remains in this case to check that the prime ideals above $2$ cannot be principal. 
if your main hypothesis is that $\pm p$ is not a square mod $d$, then a direct calculation of norms of elements solves the problem, as in the shortcut given by @Lisa. But of course the long detour that we made was only meant to clear up your assumptions and understand what is going on.