2. Solve the equation $1!+2!+\ldots+x!=y^{z}$, where $x, y$ and $z$ are natural numbers and $z>1$.
Solution. First, we note that every triple $(1,1, z), z \in\{2,3, \ldots\}$ is a solution to the given equation.

a) Let $z=2$. The equation takes the form $1!+2!+\ldots+x!=y^{2}$. The number $y^{2}$ when divided by 5 gives remainders $-1,0$ and 1, and for $x \geq 4$ we have

$$
1!+2!+3!+\ldots+x!\equiv 1!+2!+3!+4!\equiv 3(\bmod 5)
$$

According to this, if the triple $(x, y, 2)$ is a solution to the given equation, then $x \leq 3$. By direct verification, we find that for $x=2$ there is no solution, and for $x=3$ the solution is the triple $(3,3,2)$.

b) Let $z=3$. The equation takes the form $1!+2!+\ldots+x!=y^{3}$. The number $y^{3}$ when divided by 7 gives remainders $-1,0$ and 1, and for $x \geq 7$ we have

$$
1!+2!+3!+\ldots+x!\equiv 1!+2!+3!+4!+5!+6!\equiv 5(\bmod 7)
$$

According to this, if the triple $(x, y, 3)$ is a solution to the given equation, then $x \leq 5$. By direct verification, we find that for $x \in\{2,3,4,5\}$ there is no solution to the equation.

c) Let $z \geq 4$. If for natural numbers $x>1, y$ and $z \geq 4$ we have

$$
1!+2!+\ldots+x!=y^{z}
$$

then $3 \mid 1!+2!+\ldots+x!=3+3!+\ldots+x$ !, so $3 \mid y^{z}$, i.e., $3 \mid y$, from which we conclude that $3^{z} \mid y^{z}$. This means that the number $1!+2!+\ldots+x!$ is divisible by $3^{4}=81$. Further, the number $1!+ 2!+\ldots+8!=46233$ is divisible by 9, but not by 81. Since the number $k!$ is divisible by 81 for every $k \geq 9$, we conclude that $x \leq 7$. By direct verification, we find that for no $x \in\{2,3,4,5,6,7\}$ the number $1!+ 2!+\ldots+x!$ is divisible by 81. Therefore, the given equation has no solutions where $x>1$ and $z \geq 4$.

Finally, the only solutions to the given equation are $(1,1, z), z \in\{2,3, \ldots\}$ and $(3,3,2)$.