Problem

Source: 2022 Turkey TST P1 Day 1 + 2023 Dutch BxMO TST, Problem 5

Tags: number theory, modular arithmetic, number theory proposed, Diophantine equation



Find all pairs of prime numbers $(p,q)$ for which \[2^p = 2^{q-2} + q!.\]