3. Find all non-negative integers $m$, $n$, for which $\left|4 m^{2}-n^{n+1}\right| \leqq 3$.

(Tomáš Jurík)
SOLUTION. Given $\mathrm{k}$, since the term $\mathrm{s} n$ grows much faster than the term $\mathrm{s} m$, it makes sense to first examine small values of $m$.

If $m=0$, the examined relation is equivalent to the inequality $n^{n+1} \leqq 3$. This is clearly satisfied by $n=0$ and $n=1$, while for $n \geqq 2$ we have $n^{n+1} \geqq 8$. Thus, we get two solutions $(m, n)=(0,0)$ and $(m, n)=(0,1)$.

For $m=1$, we solve the inequality $\left|4-n^{n+1}\right| \leqq 3$. We see that $n=0$ does not satisfy, $n=1$ does satisfy, and for $n \geqq 2$ we have $\left|4-n^{n+1}\right|=n^{n+1}-4 \geqq 4$. Thus, we have the solution $(m, n)=(1,1)$.

From now on, we will assume that $m \geqq 2$, rewrite the given inequality in the form of the equation $4 m^{2}=n^{n+1}+a$, where $a$ is an (unknown) integer whose absolute value does not exceed 3, and distinguish the cases $a=0,|a| \in\{1,3\}$, and $|a|=2$.

First, let's consider the case when $4 m^{2}=n^{n+1}$. The left side of the equation is a positive even number, which is also a square of an integer. The same must be true for the right side of the equation, so the number $n$ must be positive and even: let $n=2 k$. Then $n^{n+1}=(2 k)^{2 k+1}$, and since the exponent $2 k+1$ is odd, this number will be a square of an integer if and only if its base $2 k$ is a square of an integer, i.e., $2 k=r^{2}$, where $r$ is a positive integer, which must clearly be even. Therefore, $r=2 l$, and thus $k=2 l^{2}$ and $n=2 k=4 l^{2}$, where $l$ is a positive integer. Since $m$ is positive, from the equation $4 m^{2}=n^{n+1}$, after dividing by four and taking the square root, we get

$$
m=\sqrt{\frac{n^{n+1}}{4}}=\frac{\left(\sqrt{4 l^{2}}\right)^{4 l^{2}+1}}{2}=\frac{(2 l)^{4 l^{2}+1}}{2}=l \cdot(2 l)^{4 l^{2}}.
$$

For each positive integer $l$, it follows that the pair $(m, n)=\left(l(2 l)^{4 l^{2}}, 4 l^{2}\right)$ is a solution to the problem.

Now consider the cases $4 m^{2}=n^{n+1} \pm a$, where $a \in\{1,3\}$. From the fact that the right side of the equation must be an even number, it follows that $n^{n+1}$ must be an odd number, which means that $n$ itself is an odd number. Let $n=2 k+1$, where $k$ is a non-negative integer. Then we get

$$
\begin{aligned}
4 m^{2} & =n^{2 k+2} \pm a \\
\left(2 m+n^{k+1}\right)\left(2 m-n^{k+1}\right) & = \pm a
\end{aligned}
$$

The number $\pm a$ needs to be factored into the product of two integers, which in their sum give $\left(2 m+n^{k+1}\right)+\left(2 m-n^{k+1}\right)=4 m \geqq 8$ (we used the assumption $\left.m \geqq 2\right)$. At least one of them must be greater than 3, which cannot happen because among the divisors of the number $\pm a$ can only be the numbers $-3,-1,1,3$.

The last possibility to consider is $4 m^{2}=n^{n+1} \pm 2$. From this equation, it follows that the number $n$ is not zero and is even, so its power $n^{n+1}$ with an exponent greater than 1 is divisible by four, just like $4 m^{2}$ on the left side of the equation. We see that the required equality cannot hold, so in this case, we do not get any solutions.

Conclusion. All solutions to the problem are $(0,0),(0,1),(1,1)$ and infinitely many pairs of the form $(m, n)=\left(l(2 l)^{4 l^{2}}, 4 l^{2}\right)$, where $l$ is any natural number.

## GUIDING AND SUPPLEMENTARY PROBLEMS:

N1. Find all natural numbers $n$ such that $n^{n+1}$ is a square of a natural number. [Clearly, all odd numbers $n$ satisfy this, since then the exponent $n+1$ is even. If $n$ is even, the exponent $n+1$ is odd, so $n$ itself must be a square of an integer, i.e., $n=4 k^{2}$ for some integer $k$.]

N2. Find all solutions to the inequality $\left|x^{2}-y^{2}\right| \leqq 2$, where $x, y$ are integers. [We have the equation $(x-y)(x+y)=a$, where $|a| \leqq 2$. Thus, either $(x-y)(x+y)=0$ and the problem is satisfied by any pairs $(x, x)$ and $(x,-x)$, where $x$ is an integer, or $|x+y|=|x-y|=1$, since both numbers $x-y, x+y$ clearly have the same parity. We easily find four more satisfying pairs: $(0, \pm 1),( \pm 1,0)$.]

D1. Prove that no number of the form $4 k+2$, where $k$ is an integer, can be written as the difference of two squares of integers. [Squares of integers give remainders 0 and 1 when divided by 4, so the difference of two of them can only give a remainder of 0, 1, or $3 \equiv-1$.]

D2. Find all natural numbers $x$ such that $x^{2}+x-2$ is a power of two. [We have $x^{2}+x-2=(x-1)(x+2)$, so both numbers $x-1$ and $x+2$ must be powers of two. Their difference is 3, so one of these powers must be odd. The only possibility is $x-1=2^{0}=1$ or $x=2$, which indeed satisfies, since $x^{2}+x-2=4$.]

D3. Find all natural numbers $x$ such that $x^{2}+x+1$ is a square of an integer. [No such number $x$ exists, since $x^{2}<x^{2}+x+1<(x+1)^{2}$.]