Let's determine those positive integers $n$ for which

$$
1 \cdot 2^{0}+2 \cdot 2^{1}+3 \cdot 2^{2}+\ldots+n \cdot 2^{n-1}
$$

is a perfect square.
By repeatedly applying the formula for the sum of a geometric series, we can arrive at the closed form of the sum:

$$
\begin{aligned}
& 1 \cdot 2^{0}+2 \cdot 2^{1}+3 \cdot 2^{2}+\ldots+n \cdot 2^{n-1}= \\
= & \left(2^{0}+2^{1}+2^{2}+\ldots+2^{n-1}\right)+\left(2^{1}+2^{2}+\ldots+2^{n-1}\right)+ \\
& +\left(2^{2}+\ldots+2^{n-1}\right)+\ldots+\left(2^{n-1}\right)= \\
= & \left(2^{n}-1\right)+\left(2^{n}-2\right)+\left(2^{n}-2^{2}\right)+\ldots+\left(2^{n}-2^{n-1}\right)= \\
= & n \cdot 2^{n}-\left(1+2+2^{2}+\ldots+2^{n-1}\right)=n \cdot 2^{n}-\left(2^{n}-1\right)= \\
= & (n-1) \cdot 2^{n}+1
\end{aligned}
$$

Thus, the requirement of the problem takes the following form:

$$
\begin{aligned}
(n-1) \cdot 2^{n}+1 & =k^{2}, \quad \text { i.e., } \\
(n-1) \cdot 2^{n} & =k^{2}-1=(k+1) \cdot(k-1)
\end{aligned}
$$

Here, the product of the two numbers of the same parity, $(k+1)$ and $(k-1)$, is even, so both numbers are even, and since their difference is 2, one of them is not divisible by 4. Therefore, either $k+1=2^{n-1} t$ (where $t$ is odd) and $k-1=2 \cdot \frac{n-1}{t}$, or $k+1=2 s$ (where $s$ is odd) and $k-1=2^{n-1} \cdot \frac{n-1}{s}$. In the first case,

$$
\begin{aligned}
2 & =(k+1)-(k-1)=2^{n-1} t-2 \cdot \frac{n-1}{t} \\
2 t & =2^{n-1} t^{2}-2(n-1) \\
n-1 & =t\left(2^{n-2} t-1\right) \geq 2^{n-2}-1
\end{aligned}
$$

In the second case, similarly,

$$
\begin{aligned}
2 & =(k+1)-(k-1)=2 s-2^{n-1} \cdot \frac{n-1}{s} \\
2 s & =2 s^{2}-2^{n-1}(n-1) \\
2^{n-2}(n-1) & =s^{2}-s=s(s-1)
\end{aligned}
$$

from which (since $s$ is odd and thus a divisor of $(n-1)$) $s(s-1)<(n-1)^{2}$, and thus $2^{n-2}<n-1$ follows. Based on this, $n \geq 2^{n-2}$, which is only true for $n \leq 4$. Testing the four possible values of $n$, only $n=1$ and $n=4$ satisfy; for the former, $(n-1) \cdot 2^{n}+1=1^{2}$, and for the latter, $(n-1) \cdot 2^{n}+1=7^{2}$.

Using the solution of András Schifferer (12th grade, Táncsics Mihály Gymnasium, Kaposvár) and

Péter Kupás Vendel (12th grade, Berze Nagy János Gymnasium, Gyöngyös)