Find all positive integers $n$ such that there exists a sequence $a_{1}$, $a_{2}, \cdots, a_{n}$ consisting of $-1,1$ satisfying $\sum_{i=1}^{n} a_{i} i^{2}=0$.
Solve $n=\left\{\begin{array}{ll}4 k+3, & k \geqslant 1, \\ 4 k, \quad k \geqslant 2 .\end{array}\right.$
Obviously, when $n=4 k+1,4 k+2$, the sum $\sum_{i=1}^{n} a_{i} i^{2}$ is odd. It is not difficult to verify that for $n=3,4, \sum_{i=1}^{n} a_{i} i^{2} \neq 0$.

Since $n^{2}-(n+1)^{2}-(n+2)^{2}+(n+3)^{2}=4$, if there is a solution for $n$, then $n+8 k(k \geqslant 0)$ also has a solution. Therefore, it is only necessary to verify that there are solutions for $n=7,11,12$.
$$
\begin{array}{l}
n=7: \\
1^{2}+2^{2}-3^{2}+4^{2}-5^{2}-6^{2}+7^{2}=0 \\
n=11: \\
1^{2}-2^{2}+3^{2}+4^{2}+5^{2}-6^{2}-7^{2}-8^{2}+9^{2}-10^{2}+11^{2}=0 \\
n=12: \\
1^{2}-2^{2}+3^{2}+4^{2}+5^{2}-6^{2}+7^{2}-8^{2}+9^{2}-10^{2}-11^{2}+12^{2}=0 .
\end{array}
$$