4. Find all positive integers $n$ and $k$, such that $(n+1)^{n}=2 n^{k}+3 n+1$.

 untranslated text remains the same as requested.
SOLUTION. For $n=1$, the equation reads $2=6$, clearly false. Thus, $n \geq 2$. By the binomial formula,

$$
(n+1)^{n}-1=n^{2}+\left(\begin{array}{l}
n \\
2
\end{array}\right) n^{2}+\left(\begin{array}{l}
n \\
3
\end{array}\right) n^{3}+\ldots
$$

is a multiple of $n^{2}$. We then have two cases to analyze:

- $\mathrm{k}=1$. Then, $n^{2}$ divides $2 n^{1}+3 n=5 n$, that is, $n$ divides 5, so $n=5$, and the equation becomes $6^{5}=26$, clearly false.
- $\quad k \geq 2$. Then, $n^{2}$ divides $2 n^{k}+3 n$, but since it divides $2 n^{k}$, it must also divide $3 n$, that is, $n$ divides 3, so $n=3$. It is easily verified that for $n=3$, the equation becomes $4^{3}=2 \times 3^{k}+10$, then $3^{k}=27=3^{3}$, which is true if and only if $k=3$.