Suppose $a$ is a non-zero element in a finite field $GF(q)$ of odd characteristic.
How many $x \in GF(q)$ are such that $a^2+x^2$ is a square in $GF(q)$?
From some experiments with some small fields, it seems that the answer is $(q+\epsilon)/2$, where $\epsilon = q \mod 4$ , but I can't prove it.
Any help appreciated!
Let $N$ be the number of solutions for $(x,y) \in \mathbb{F}_q$ of $a^2+x^2=y^2$. This equation is equivalent to $(y-x)(x+y)=a^2$. Since $q$ is odd, $(x,y) \in \mathbb{F}_q^2 \longmapsto (x+y,y-x) \in \mathbb{F}_q^2$ is a bijection, so $N$ is the number of solutions to $xy=a^2$. There are obviously $q-1$ of them.
Now, we can group the solutions of $x^2+a^2=y^2$ into two groups: when $y \neq 0$, and $y=0$. Let $N_1,N_2$ be the numbers of solutions in each group.
Then the number $Q$ of $x$ such that $x^2+a^2$ is a perfect square is $N_1/2+N_2$. Now, $N_2$ is zero or two, and two iff $-a^2$ is a square iff $-1$ is a square iff $4|q-1$.
So if $4|q-1$, $N_2=2,N_1=q-3$ so $Q=\frac{q+1}{2}$. If not, $N_2=0,N_1=q-1$ so $Q=\frac{q-1}{2}$.