IMC 2020 · Problem 6

Day 227th IMC · Online

Statement

Find all prime numbers pp for which there exists a unique a{1,2,,p}a \in \{1, 2, \ldots, p\} such that a33a+1a^3 - 3a + 1 is divisible by pp.

Official solution

Hidden so you can work on the problem first.