6. For which natural numbers $n$ is the number

$$
\frac{1! \cdot 2! \cdot 3! \cdot \ldots \cdot (2n)!}{(n+1)!}
$$

a perfect square? (As usual, $n!$ denotes the product of all natural numbers not exceeding $n$. For example, $4! = 1 \cdot 2 \cdot 3 \cdot 4$.)
Answer: for numbers of the form $n=4 k(k+1)$ and $n=2 k^{2}-1$.

Solution. It is sufficient to understand for which $n$ the number $A=(n+1)!\cdot 1!\cdot 2!\cdot 3!\cdot \ldots \cdot(2 n)!$ is a perfect square. Note that $(2 k-1)!(2 k)!=2 k \cdot((2 k-1)!)^{2}$. Therefore,

$$
A=(n+1)!\cdot 2 \cdot 4 \cdot 6 \cdot \ldots \cdot(2 n) \cdot(1!\cdot 3!\cdot 5!\cdot \ldots \cdot(2 n-1)!)^{2}
$$

Thus, the number $A$ is a perfect square if and only if the number

$$
(n+1)!\cdot 2 \cdot 4 \cdot 6 \cdot \ldots \cdot(2 n)=(n+1)!\cdot 2^{n} \cdot n!=(n!)^{2} \cdot 2^{n}(n+1)
$$

is a perfect square. This is equivalent to the number $B=2^{n}(n+1)$ being a perfect square. If $n$ is even, then $B$ is a perfect square if and only if $n+1$ is the square of an odd number. Thus, $n+1=(2 k+1)^{2}$ and, therefore, $n=4 k^{2}+4 k$ for some natural number $k$. If $n$ is odd, then $B$ is a perfect square if and only if $2(n+1)$ is the square of an even number. Therefore, $2(n+1)=(2 k)^{2}$ and, thus, $n=2 k^{2}-1$ for some natural number $k$.