Subfield: Number Theory


Question: For each prime $p$, there is a kingdom of $p$-Landia consisting of $p$ islands numbered $1,2, \ldots, p$. Two distinct islands numbered $n$ and $m$ are connected by a bridge if and only if $p$ divides $\left(n^{2}-m+1\right)\left(m^{2}-n+1\right)$. The bridges may pass over each other, but cannot cross. Prove that for infinitely many $p$ there are two islands in $p$-Landia not connected by a chain of bridges.

Solution:
We prove that for each prime $p>3$ dividing a number of the form $x^{2}-x+1$ with integer $x$ there are two unconnected islands in $p$-Landia.

For brevity's sake, when a bridge connects the islands numbered $m$ and $n$, we shall speak simply that it connects $m$ and $n$.

A bridge connects $m$ and $n$ if $n \equiv m^{2}+1(\bmod p)$ or $m \equiv n^{2}+1(\bmod p)$. If $m^{2}+1 \equiv n$ $(\bmod p)$, we draw an arrow starting at $m$ on the bridge connecting $m$ and $n$. Clearly only one arrow starts at $m$ if $m^{2}+1 \not \equiv m(\bmod p)$, and no arrows otherwise. The total number of bridges does not exceed the total number of arrows.

Suppose $x^{2}-x+1 \equiv 0(\bmod p)$. We may assume that $1 \leqslant x \leqslant p$; then there is no arrow starting at $x$. Since $(1-x)^{2}-(1-x)+1=x^{2}-x+1,(p+1-x)^{2}+1 \equiv(p+1-x)(\bmod p)$, and there is also no arrow starting at $p+1-x$. If $x=p+1-x$, that is, $x=\frac{p+1}{2}$, then $4\left(x^{2}-x+1\right)=p^{2}+3$ and therefore $x^{2}-x+1$ is not divisible by $p$. Thus the islands $x$ and $p+1-x$ are different, and no arrows start at either of them. It follows that the total number of bridges in $p$-Landia does not exceed $p-2$.

Let $1,2, \ldots, p$ be the vertices of a graph $G_{p}$, where an edge connects $m$ and $n$ if and only if there is a bridge between $m$ and $n$. The number of vertices of $G_{p}$ is $p$ and the number of edges is less than $p-1$. This means that the graph is not connected, which means that there are two islands not connected by a chain of bridges.

It remains to prove that there are infinitely many primes $p$ dividing $x^{2}-x+1$ for some integer $x$. Let $p_{1}, p_{2}, \ldots, p_{k}$ be any finite set of such primes. The number $\left(p_{1} p_{2} \cdot \ldots \cdot p_{k}\right)^{2}-p_{1} p_{2} \cdot \ldots \cdot p_{k}+1$ is greater than 1 and not divisible by any $p_{i}$; therefore it has another prime divisor with the required property.
One can show, by using only arithmetical methods, that for infinitely many $p$, the kingdom of $p$-Ladia contains two islands connected to no other island, except for each other.

Let arrows between islands have the same meaning as in the previous solution. Suppose that positive $a<p$ satisfies the congruence $x^{2}-x+1 \equiv 0(\bmod p)$. We have seen in the first solution that $b=p+1-a$ satisfies it too, and $b \neq a$ when $p>3$. It follows that $a b \equiv a(1-a) \equiv 1$ $(\bmod p)$. If an arrow goes from $t$ to $a$, then $t$ must satisfy the congruence $t^{2}+1 \equiv a \equiv a^{2}+1$ $(\bmod p)$; the only such $t \neq a$ is $p-a$. Similarly, the only arrow going to $b$ goes from $p-b$. If one of the numbers $p-a$ and $p-b$, say, $p-a$, is not at the end of any arrow, the pair $a, p-a$ is not connected with the rest of the islands. This is true if at least one of the congruences $x^{2}+1 \equiv-a, x^{2}+1 \equiv-b$ has no solutions, that is, either $-a-1$ or $-b-1$ is a quadratic non-residue modulo $p$.

Note that $x^{2}-x+1 \equiv x^{2}-(a+b) x+a b \equiv(x-a)(x-b)(\bmod p)$. Substituting $x=-1$ we get $(-1-a)(-1-b) \equiv 3(\bmod p)$. If 3 is a quadratic non-residue modulo $p$, so is one of the numbers $-1-a$ and $-1-b$.

Thus it is enough to find infinitely many primes $p>3$ dividing $x^{2}-x+1$ for some integer $x$ and such that 3 is a quadratic non-residue modulo $p$.

If $x^{2}-x+1 \equiv 0(\bmod p)$ then $(2 x-1)^{2} \equiv-3(\bmod p)$, that is, -3 is a quadratic residue modulo $p$, so 3 is a quadratic non-residue if and only if -1 is also a non-residue, in other words, $p \equiv-1(\bmod 4)$.

Similarly to the first solution, let $p_{1}, \ldots, p_{k}$ be primes congruent to -1 modulo 4 and dividing numbers of the form $x^{2}-x+1$. The number $\left(2 p_{1} \cdot \ldots \cdot p_{k}\right)^{2}-2 p_{1} \cdot \ldots \cdot p_{k}+1$ is



not divisible by any $p_{i}$ and is congruent to -1 modulo 4 , therefore, it has some prime divisor $p \equiv-1(\bmod 4)$ which has the required properties.