2024 SSMO Team Round Problems/Problem 12

Problem

What is the smallest positive integer $n$ with 3 positive prime factors such that for all integers $k$, $k^n \equiv k \pmod n$?

Solution