Problem

Source: Iran 2005

Tags: number theory proposed, number theory



Let $a\in\mathbb N$ and $m=a^2+a+1$. Find the number of $0\leq x\leq m$ that:\[x^3\equiv1(\mbox{mod}\ m)\]