Problem

Source: Thailand 2023 TSTST2/4

Tags: number theory



Find all pairs $(p, n)$ with $n>p$, consisting of a positive integer $n$ and a prime $p$, such that $n^{n-p}$ is an $n$-th power of a positive integer.