2. In the set of natural numbers, solve the equation

$$
x!+4=4(x+3)^{y}
$$
2. Let's first note that from the given equation it follows that 4 | $x$!, from which we get $x \geqslant 4$.

Assume first that $x+3$ is a composite number. Then, if $x+3$ were divisible by some prime factor $p, p \geqslant 3$, we would have $p \leqslant x$ (indeed, clearly $x+2 \nmid x+3$, and for $x+1=p \geqslant 3$ we again have $x+1 \nmid x+3$); but then $p \mid x!$ and $p \nmid 4$, so $p$ does not divide the left side of the equation but divides the right side, a contradiction. Therefore, if $x+3$ is a composite number, then $x+3$ must be a power of two. However, in that case, the right side is clearly divisible by 8, while for $x \geqslant 4$ we have $8 \mid x!$ and $8 \nmid 4$ so $8 \nmid x!+4$, a contradiction.

Therefore, $x+3$ is a prime number, say $p$. From the given equation, we have $x+3 \mid x!+4$, i.e., $p \mid (p-3)!+4$. From this, we get $p \mid ((p-3)!+4)(p-2) = (p-2)! + 4(p-2)$, and by a version of Wilson's theorem, we get $(p-2)! + 4(p-2) \equiv 1 + 4 \cdot (-2) = -7 \pmod{p}$; from which it follows that $p=7$, i.e., $x=4$. In this case, we indeed find a solution:

$$
4! + 4 = 28 = 4 \cdot 7 = 4 \cdot (4 + 3)^1
$$

i.e., the only solution is the pair $(x, y) = (4, 1)$.

![](https://cdn.mathpix.com/cropped/2024_06_04_841f52b4ffb037ad799bg-46.jpg?height=459&width=616&top_left_y=2001&top_left_x=211)