Problem

Source: 2023 Austrian Federal Competition For Advanced Students, Part 1 p4

Tags: number theory



Find all pairs of positive integers $(n, k)$ satisfying the equation $$n!+n=n^k.$$