# Are there any connections between $a$ and $c$ where $p = a^2 + 2b^2 = c^2 + d^2$?

Let $$p$$ be a prime such that $$p \equiv 1 \mod 8$$. Then we know there exists $$a,b \in \mathbb{Z}$$ such that $$p = a^2 + 2b^2$$. But at the same time $$p \equiv 1 \mod 4$$, so there also exists $$c,d \in \mathbb{Z}$$ such that $$p = c^2 + d^2$$.

My question is: Are there any interesting connections between $$a$$ and $$c$$ (or $$b$$ and $$d$$)?

Here is another example I have in mind: Let $$p \equiv 1 \mod 6$$ and $$\chi_6$$ be a primitive character $$\mod p$$ of order $$6$$. Let $$g$$ be a primitive root modulo $$p$$ and $$Z$$ denote the index of $$2$$ with respect to $$g$$ modulo $$p$$ (that is, $$g^Z \equiv 2 \mod p$$). Consider the Jacobi sum \begin{align*} J(\chi) = \sum_{a = 1}^{p-1} \chi_6(a) \chi_6(a-1). \end{align*} Then we know that $$J(\chi_6) = \left(\frac{-1}{p}\right)\frac{1}{2}(u + v\sqrt{-3})$$, where $$\left(\frac{\cdot}{p}\right)$$ is the Legendre symbol, $$u,v \in \mathbb{Z}$$ such that $$4p = u^2 + 3v^2$$, $$u \equiv 1 \mod 3$$, $$v \equiv Z \mod 3$$, and $$3v \equiv (2g^{(p-1)/3}+1)u \mod p$$.

On the other hand, $$\chi_3 = \chi_6^2$$ is a character of order $$3$$, and $$J(\chi_3) = \left(\frac{-1}{p}\right)\frac{1}{2}(r + s\sqrt{-3})$$, where $$r,s \in \mathbb{Z}$$ such that $$4p = r^2 + 3s^2$$, $$r \equiv 1 \mod 3$$, $$s \equiv 0 \mod 3$$, and $$3s \equiv (2g^{(p-1)/3}+1)r \mod p$$.

We can show that $$$$(\star) \,\,\,\, \left(J(\chi_3^2)\right)^3 = \left((-1)^{(p-1)/6}J(\chi_6^5)\right)^3$$$$

and because $$J(\chi_6^5) \equiv (-1)^{(p-1)/6 + 1}u \mod p$$ and $$J(\chi_3^2) \equiv r \mod p$$, we get $$u^3 \equiv r^3 \mod p$$.

Going back to the case where $$p \equiv 1 \mod 8$$, with $$\chi_8$$ a primitive character $$\mod p$$ of order $$8$$ and $$\chi_4 = \chi_8^2$$, I am wondering if there is a similar congruence to $$(\star)$$ for $$J(\chi_8)$$ and $$J(\chi_4)$$, whose values involve $$a,b,c,d$$ defined above analogous to $$u,v,r,s$$.

• Of course $a^2 + 2b^2 = c^2 + d^2$ iff $c^2 + 2(b-d)^2 = a^2 + (2b-d)^2$ Mar 31 at 9:56
• What do you mean by $v\equiv Z\bmod3$? Mar 31 at 12:05
• @GerryMyerson $Z$ is the index of 2 with respect to the primitive root $g$ mod $p$ (written in my second paragraph). Mar 31 at 22:24
• Both $a + b \sqrt{-2}$ and $c + di$ are partial norms from ${\mathbb Z}[\zeta_8]$. For questions on Jacobi sums, the standard reference is the book by Berndt, Evans and Williams Apr 2 at 7:02