Putnam 2014, Problem B-4

Show that for each positive integer $n$, all the roots of the polynomial
$$\sum_{k=0}^n 2^{k(n-k)} x^k$$
are real numbers.

Solution:
Define \(f_n(x) = \sum_{k=0}^n 2^{k(n-k)} x^k\). For \(n = 1, 2\), \(f_1(x) = 1 + x\), \(f_2(x) = 1 + 2x + x^2 = (1 + x)^2\). For \(n \geq 3\), \(f_n(-2^{-n}), f_n(-2^{-n+2}), \dots, f_n(-2^n)\) alternate in sign. By the intermediate value theorem, \(f_n\) has a root in each interval \((-2^{-n}, -2^{-n+2}), \dots, (-2^2, -2^n)\), so \(f_n\) has \(n\) distinct real roots. For \(j \in \{0, \dots, n\}\), group terms of \(f_n(x)\) as trinomials and binomials. Evaluating at \(x = -2^{-n+2j}\), the trinomial is 0, and the remaining terms have sign \((-1)^j\). Since \(n \geq 3\), there is at least one non-trivial term, so \(f_n(-2^{-n+2j})\) has sign \((-1)^j\), proving alternation.