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$.
Problem
Source: BdMO 2023 Higher Secondary National P1
Tags: factorial, number theory, Diophantine equation
12.02.2023 18:36
Obviously $z>x$. If $x>=3$ then $mod3$ gives contradiction. If $x=0,1$ with $mod2$ we get $y=0$ and $z=1$ If $x=2$ with $mod4$ we get $y=1$ contradiction or $z<=3$ easy to get $y=2$ and $z=3$
12.02.2023 18:39
It is trivial that $x \le 2$ If $x < 2$ $z!$ is odd So $z = 0$ or $z = 1$ $(x,y,z) = (0,0,2)$ or $(1,0,2)$ Hence $x = 2$ $2 + 2^y = z!$ If $y >1$ $z! \equiv 2 \pmod 4$ $z = 2,3$ If $z = 3$, $y=2$ satisfies if $y=1$ $z! = 4$ contradiction Only solutions are $(x,y) = (2,2)$ and $(0,0$ and (1,0)$
13.02.2023 06:00
$x\le 2$ For $x=2$ by mod 4 we have $ z $ less than 4
07.09.2023 00:52
Note, that $z>x$, now if $x \ge 3,$ taking mod 3, gives a contradiction. If $x=0$, we have $2^y+1=z!$, note that if $z$, is greater than $1,$ we have parity, contradiction. Hence, $z=1$, and $y=0.$ So, $(0,1)$ works. If $x=2,$ we get $(2,3)$, works.
18.01.2025 19:24
$2^y=x!(z(z-1)(z-2)...(x+1)-1)$ So,$ x \leq 2 $ and $z(z-1)(z-2)...(x+1)-1=2^n$ But for $z \geq 4$ and $x=2$ $z(z-1)(z-2)...(x+1)-1$ is odd, so there are no such $z$. So we get $z\leq 3$ and$ x\leq 2$ Solutions are: $(0,0,2),(1,0,2),(2,2,3)$