# Rational prime factors in the components of powers of Gaussian primes

Let $$\pi=a+bi\in \mathbb{Z}[i]$$ be a Gaussian prime with $$a$$ and $$b$$ nonzero, and $$b$$ even. For odd rational primes $$p=\pi\bar\pi$$ and $$q\neq p$$, define $$\pi^{\frac{1}{2}\left(q-\left(\frac{-1}{q}\right)\right)} = \alpha + \beta i$$, then: \begin{align} \left(\frac{p}{q}\right)=-1 &\iff q\vert\alpha,\;\mathrm{and}\\ \left(\frac{p}{q}\right)=1 &\iff q\vert\beta. \end{align}

I was able to prove this using expansions of $$\alpha\beta$$ for $$q=3\;\mathrm{mod}\;4$$, and $$p\alpha\beta$$ for $$q=1\;\mathrm{mod}\;4$$, which is straightforward but not particularly insightful. I have searched the literature for a proof that ties this result to the broader concepts of quadratic residues, but I have not been able to find any mention of it.

Specifically, my question is, is this a known result? If so, is there a reference that ties it into the broader context of quadratic residues and reciprocity laws?

We have the following generalization: Let $$K$$ be a quadratic extension of $$\mathbb Q$$, $$\mathcal O_K$$ the ring of integers, $$q$$ an odd prime of $$\mathbb Q$$ unramified in $$K$$, and $$x \in \mathcal O_K$$ prime to $$q$$. Let $$e = \frac{ q-1}{2}$$ if $$q$$ splits in $$K$$ or $$e=\frac{q+1}{2}$$ if $$q$$ is inert in $$K$$.
Then $$x^{e} \in \mathbb Z + q \mathcal O_K$$ if and only if $$\left( \frac{\operatorname{Norm}(x) }{q} \right)=1$$ and $$\operatorname{tr} (x^e) \in q \mathbb Z$$ if and only if $$\left( \frac{\operatorname{Norm}(x) }{q} \right)=-1$$.
Proof: The key identity here is that $$x^q = \operatorname{Frob}_q(x) = \begin{cases} x & \textrm{if }q\textrm{ split} \\ \overline{x}& \textrm{if }q\textrm{ inert} \end{cases}$$ which combined with the usual formula for the quadratic residue gives (mod $$q$$)
$$\left( \frac{ \operatorname{Norm}(x)}{q} \right) = \left( \frac{ x\overline{x}}{q} \right) = x^{ \frac{q-1}{2}} {\overline{x}}^{\frac{q-1}{2}} = x^{ \frac{q-1}{2}} {\overline{x}}^{\frac{q-1}{2}} \cdot \frac{ \operatorname{Frob}_q(x)}{x^q} =\begin{cases} x^{ - \frac{q-1}{2}} \overline{x}^{\frac{q-1}{2}} & \textrm{if }q\textrm{ split} \\ x^{ - \frac{q+1}{2}} \overline{x}^{\frac{q+1}{2}} & \textrm{if }q\textrm{ inert} \end{cases}$$ $$= \frac{ \overline{x}^e}{ x^e} = \frac{ \overline{x^e}}{x^e}.$$
If the quadratic residue symbol is $$1$$ this gives $$\overline{x^e}=x^e$$ (mod $$q$$), so $$x^e \in \mathbb Z + q \mathcal O_K$$, while if the quadratic residue symbol is $$-1$$ his gives $$\overline{x^e}=-x^e$$ (mod $$q$$), so $$\operatorname{tr}(x^e) = x^e + \overline{x^e}=0$$ mod $$q$$.