Problem

Source: BdMO 2023 Higher Secondary National P1

Tags: factorial, number theory, Diophantine equation



Find all possible non-negative integer solution ($x,$ $y$) of the following equation- $$x!+2^y=z!$$Note: $x!=x\cdot(x-1)!$ and $0!=1$. For example, $5!=5\times4\times3\times2\times1=120$.