A cycle of $x^2 \bmod p$ must contain both numbers greater than half of $p$ and numbers less than half of $p$

33 Views Asked by At

Let us define $f(x) = x^2 \bmod p$, $x=0,1,\cdots,p-1$, where $p$ is a given prime number ($p>2$).
Define $G (V,E)$ to be a directed graph where $V=\{0,1,\cdots p-1\}$ and $E=\{(x \to f(x)) \mid x \in V\}$.
My question is: do all cycles on this graph that contain more than two vertices contain numbers greater than half $p$ and numbers less than half $p$?
In another way, is it right that for all cycles $C$ satisfying $|C|>1$ in the graph $G$,$\exists x < {p \over 2} $ s.t. $x \in C$ and $\exists y > {p \over 2} $ s.t. $y \in C$.
I have tried several primes and it seems to be right. The picture below show the graph when $p=37$.

$G$ when $P=37$