# quadratic residues - is there an easy explanation for the pattern I'm seeing?

Let $m$ be an integer and $q$ be an odd prime factor of $m^2 + 1$. Is there an obvious reason that $\left(\frac{2m}{q}\right)$ always equals 1? From some numerics, this seems to be the case.

The last time I got stuck on something like this, it ended up just being because $-1 \equiv m^2 \pmod{m^2 + 1}$, so I'm wondering if there's something easy I'm missing.

This would be useful for an explicit 2-descent I'm doing for prime twists of elliptic curves defined in terms of $m$.

Hi, $q|(m^2+1)$ means $m^2+1\equiv 0$ (mod $q$), and so $(m+1)^2=m^2+2m+1\equiv 2m$ (mod $q$). In other words, $2m$ is the same as $(m+1)^2$ modulo $q$, so it is square mod $q$.
g6hq's answer is the only possible explanation for this sort of pattern. Suppose $f(m)$ is always, or even usually, a quadratic residue modulo any prime dividing $g(m)$. Without loss of generality, $g(m)$ is irreducible. Then in the number field $\mathbb Q(m)/g(m)$, $f(m)$ is a quadratic residue mod every split prime/most split primes, so it is a quadratic residue with Dirchlet density $>1/2$, so it is a perfect square. I believe this also gives an algorithm to determine when this happens.