Find all prime numbers ppp for which there exists a unique a∈{1,2,…,p}a \in \{1, 2, \ldots, p\}a∈{1,2,…,p} such that a3−3a+1a^3 - 3a + 1a3−3a+1 is divisible by ppp.
Hidden so you can work on the problem first.