Problem

Source: Bulgarian Autumn Tournament 2022 9.3

Tags: Diophantine equation, factorial, number theory



Find all the pairs of natural numbers $(a, b),$ such that \[a!+1=(a+1)^{(2^b)}\]