Let $n$ be a positive integer. Let $t_1 \le t_2 \le\cdots \le t_n$ be integers and let $k$ be an integer with $0\le k\le n$. Suppose that $\sum_{i=1}^{n}t_i=-k$ and $\sum_{i=1}^{n}t_{i}^{2}=k$. Clearly, $(t_1,\cdots, t_k, t_{k+1}, \dots, t_n)=(-1,\dots,-1,0,\dots,0)$ is a solution for the above equations. I think this is the only possibility for $(t_1, t_2,\cdots, t_n)$, but cannot prove.
1 Answer
It is the only solution (up to the action of $\mathfrak{S}_n$ on solutions, obviously).
First, you can change $t_i$ into $-t_i$ which give the equation $\sum t_i=k$ and $\sum t_i^2=k$. Now, assume you have at least one the $t_i$ which is negative. Remove all the negative $t_i$, which gives you a set $s_i$ of non-negative integers such that $\sum s_i$ is (strictly) larger than $\sum s_i^2$, since $\sum s_i\geq \sum t_i$ and $\sum s_i^2\leq \sum t_i^2$. This is a contradiction, so every $t_i$ is non-negative.
Finally, since they are all positive, if one of the $t_i^2$ is larger than one of the $t_i$, you also get a contradiction, so every $t_i$ is $0$ or $1$.
-
1$\begingroup$ A slight simplification in the proof: again, passing to opposite, you can assume that $t_i\geq 0$, then $\sum t_i^2-t_i=\sum $\sum t_i(t_i-1)=0$, so that $t_i(t_i-1)=0$. $\endgroup$– M. DusJul 15, 2017 at 19:13