Problem

Source: JBMO 2023 Problem 1

Tags: number theory, factorial



Find all pairs $(a,b)$ of positive integers such that $a!+b$ and $b!+a$ are both powers of $5$. Nikola Velov, North Macedonia