MathDB
directed graph labeled with residues

Source: SRMC 2023, P3

December 28, 2023
number theoryprime numbersQuadratic ResiduesDirected graphsquadratics

Problem Statement

Let pp be a prime number. We construct a directed graph of pp vertices, labeled with integers from 00 to p1p-1. There is an edge from vertex xx to vertex yy if and only if x2+1y(modp)x^2+1\equiv y \pmod{p}. Let f(p)f(p) denotes the length of the longest directed cycle in this graph. Prove that f(p)f(p) can attain arbitrarily large values.