Problem

Source: JBMO Shortlist 2023, N3

Tags: JBMO, JBMO Shortlist, number theory, AZE JBMO TST



Let $A$ be a subset of $\{2,3, \ldots, 28 \}$ such that if $a \in A$, then the residue obtained when we divide $a^2$ by $29$ also belongs to $A$. Find the minimum possible value of $|A|$.