Problem 3. For natural numbers $x$ and $y$ and an odd integer $z$, it is known that $x! + y! = 24z + 2017$. Find all possible such triples of numbers $(x, y, z)$. (Recall that $1! = 1, 2! = 1 \cdot 2, n! = 1 \cdot 2 \cdot \ldots \cdot n$)
Answer: $(1 ; 4 ;-83),(4 ; 1 ;-83),(1 ; 5 ;-79),(5 ; 1 ;-79)$.

Solution. The expression $x!+y!$ must be an odd number, so $x=1$ or $y=1$.

Let $x=1$, then $1+y!=24z+2017$ or $y!=24z+2016$. Since $2016=24 \cdot 84$, $y!$ is divisible by 24, hence $y \geqslant 4$. If $y \geqslant 6$, then $y!$ is divisible by 48 and $2016=48 \cdot 42$. In this case, $z$ would be even, which contradicts the problem's condition. Therefore, $y=4$ or 5.