Problem

Source: Mediterranean Mathematics Olympiad 2017, Problem 2

Tags: algebra



Determine the smallest integer $n$ for which there exist integers $x_1,\ldots,x_n$ and positive integers $a_1,\ldots,a_n$ so that \begin{align*} x_1+\cdots+x_n &=0,\\ a_1x_1+\cdots+a_nx_n&>0, \text{ and }\\ a_1^2x_1+\cdots+a_n^2x_n &<0. \end{align*}