{
  "index": "2014-B-4",
  "type": "ALG",
  "tag": [
    "ALG",
    "NT"
  ],
  "difficulty": "",
  "question": "Show that for each positive integer $n$, all the roots of the polynomial\n\\[\n\\sum_{k=0}^n 2^{k(n-k)} x^k\n\\]\nare real numbers.",
  "solution": "Define the polynomial $f_n(x) = \\sum_{k=0}^n 2^{k(n-k)} x^k$.\nSince\n\\[\nf_1(x) = 1+x, f_2(x) = 1 + 2x + x^2 = (1+x)^2,\n\\]\nthe claim holds for for $n=1,2$. For $n \\geq 3$, we show that the quantities\n\\[\nf_n(-2^{-n}), f_n(-2^{-n+2}), \\dots, f_n(-2^n)\n\\]\nalternate in sign; by the intermediate value theorem, this will imply that $f_n$ has a root in each of the $n$ intervals $(- 2^{-n}, - 2^{-n+2}), \\dots, (- 2^{n-2}, -2^n)$,\nforcing $f_n$ to have as many distinct real roots as its degree.\n\nFor $j \\in \\{0,\\dots,n\\}$, group the terms of $f_n(x)$ as\n\\begin{align*}\n&\\cdots \\\\\n&+ 2^{(j-5)(n-j+5)} x^{j-5} + 2^{(j-4)(n-j+4)} x^{j-4} \\\\\n&+ 2^{(j-3)(n-j+3)} x^{j-3} + 2^{(j-2)(n-j+2)} x^{j-2} \\\\\n&+ 2^{(j-1)(n-j+1)} x^{j-1} + 2^{j(n-j)} x^j + 2^{(j+1)(n-j-1)} x^{j+1} \\\\\n&+  2^{(j+2)(n-j-2)} x^{j+2} + 2^{(j+3)(n-j-3)} x^{j+3} \\\\\n&+2^{(j+4)(n-j-4)} x^{j+4} + 2^{(j+5)(n-j-5)} x^{j+5} \\\\\n& \\cdots.\n\\end{align*}\n\nDepending on the parity of $j$ and of $n-j$, there may be a single monomial left on each end. When evaluating at $x =- 2^{-n+2j}$,\nthe trinomial evaluates to $0$. In the binomials preceding the trinomial, the right-hand term dominates, so each of these binomials contributes with the sign of $x^{j-2k}$, which is $(-1)^j$. In the binomials following the trinomial, the left-hand term dominates, so again the contribution has sign $(-1)^j$.\n\nAny monomials which are left over on the ends also contribute with sign $(-1)^j$. Since $n \\geq 3$, there exists at least one contribution other than the trinomial, so $f_n(- 2^{-n+2j})$ has overall sign $(-1)^j$, proving the claimed alternation.\n\n\\noindent\n\\textbf{Remark:} Karl Mahlburg suggests an alternate interpretation of the preceding algebra: write $2^{-j^2} f_n(2^{-n+2j})$ as\n\\begin{align*}\n&2^{-j^2} - 2^{-(j-1)^2} + \\cdots + (-1)^{j-1} 2^{-1} + (-1)^j 2^{-1}\\\\\n+ &(-1)^j 2^{-1} + (-1)^{j+1} 2^{-1} + (-1)^{j+2} 2^{-2} + \\cdots,\n\\end{align*}\nwhere the two central terms $(-1)^j 2^{-1}$ arise from splitting the term arising from $x^j$. Then each row is an alternating series whose sum carries the sign of $(-1)^j$ unless it has only two terms. Since $n \\geq 3$, one of the two sums is forced to be nonzero.\n\n\\noindent\n\\textbf{Remark:} One of us (Kedlaya) received this problem and solution from David Speyer in 2009 and submitted it to the problem committee.",
  "vars": [
    "x",
    "n",
    "k",
    "j"
  ],
  "params": [
    "f_n"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "indepvar",
        "n": "posint",
        "k": "summindex",
        "j": "groupindex",
        "f_n": "sequencepoly"
      },
      "question": "Show that for each positive integer $posint$, all the roots of the polynomial\n\\[\n\\sum_{summindex=0}^{posint} 2^{summindex(posint-summindex)}\\,indepvar^{summindex}\n\\]\nare real numbers.",
      "solution": "Define the polynomial $sequencepoly(indepvar)=\\sum_{summindex=0}^{posint}2^{summindex(posint-summindex)}indepvar^{summindex}$.  \nSince\n\\[\nf_1(indepvar)=1+indepvar,\\quad f_2(indepvar)=1+2\\,indepvar+indepvar^{2}=(1+indepvar)^{2},\n\\]\nthe claim holds for $posint=1,2$. For $posint\\ge3$, we show that the quantities\n\\[\nsequencepoly(-2^{-posint}),\\;\\sequencepoly(-2^{-posint+2}),\\;\\dots,\\;\\sequencepoly(-2^{posint})\n\\]\nalternate in sign; by the intermediate value theorem, this will imply that $sequencepoly$ has a root in each of the $posint$ intervals $(-2^{-posint},-2^{-posint+2}),\\dots,(-2^{posint-2},-2^{posint})$, forcing $sequencepoly$ to have as many distinct real roots as its degree.\n\nFor $groupindex\\in\\{0,\\dots,posint\\}$, group the terms of $sequencepoly(indepvar)$ as\n\\begin{align*}\n&\\cdots\\\\\n&+2^{(groupindex-5)(posint-groupindex+5)}\\,indepvar^{groupindex-5}+2^{(groupindex-4)(posint-groupindex+4)}\\,indepvar^{groupindex-4}\\\\\n&+2^{(groupindex-3)(posint-groupindex+3)}\\,indepvar^{groupindex-3}+2^{(groupindex-2)(posint-groupindex+2)}\\,indepvar^{groupindex-2}\\\\\n&+2^{(groupindex-1)(posint-groupindex+1)}\\,indepvar^{groupindex-1}+2^{groupindex(posint-groupindex)}\\,indepvar^{groupindex}+2^{(groupindex+1)(posint-groupindex-1)}\\,indepvar^{groupindex+1}\\\\\n&+2^{(groupindex+2)(posint-groupindex-2)}\\,indepvar^{groupindex+2}+2^{(groupindex+3)(posint-groupindex-3)}\\,indepvar^{groupindex+3}\\\\\n&+2^{(groupindex+4)(posint-groupindex-4)}\\,indepvar^{groupindex+4}+2^{(groupindex+5)(posint-groupindex-5)}\\,indepvar^{groupindex+5}\\\\\n&\\cdots.\n\\end{align*}\n\nDepending on the parity of $groupindex$ and of $posint-groupindex$, there may be a single monomial left on each end. When evaluating at $indepvar=-2^{-posint+2groupindex}$, the trinomial evaluates to $0$. In the binomials preceding the trinomial, the right-hand term dominates, so each of these binomials contributes with the sign of $indepvar^{groupindex-2summindex}$, which is $(-1)^{groupindex}$. In the binomials following the trinomial, the left-hand term dominates, so again the contribution has sign $(-1)^{groupindex}$.\n\nAny monomials which are left over on the ends also contribute with sign $(-1)^{groupindex}$. Since $posint\\ge3$, there exists at least one contribution other than the trinomial, so $sequencepoly(-2^{-posint+2groupindex})$ has overall sign $(-1)^{groupindex}$, proving the claimed alternation.\n\n\\noindent\\textbf{Remark:} Karl Mahlburg suggests an alternate interpretation of the preceding algebra: write $2^{-groupindex^{2}}sequencepoly(2^{-posint+2groupindex})$ as\n\\begin{align*}\n&2^{-groupindex^{2}}-2^{-(groupindex-1)^{2}}+\\cdots+(-1)^{groupindex-1}2^{-1}+(-1)^{groupindex}2^{-1}\\\\\n+&(-1)^{groupindex}2^{-1}+(-1)^{groupindex+1}2^{-1}+(-1)^{groupindex+2}2^{-2}+\\cdots,\n\\end{align*}\nwhere the two central terms $(-1)^{groupindex}2^{-1}$ arise from splitting the term coming from $indepvar^{groupindex}$. Each row is an alternating series whose sum carries the sign of $(-1)^{groupindex}$ unless it has only two terms. Since $posint\\ge3$, one of the two sums is forced to be nonzero.\n\n\\noindent\\textbf{Remark:} One of us (Kedlaya) received this problem and solution from David Speyer in 2009 and submitted it to the problem committee."
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "telescope",
        "n": "marigold",
        "k": "driftwood",
        "j": "lighthouse",
        "f_n": "pendulum_{marigold}"
      },
      "question": "Show that for each positive integer $marigold$, all the roots of the polynomial\n\\[\n\\sum_{driftwood=0}^{marigold} 2^{driftwood(marigold-driftwood)} telescope^{driftwood}\n\\]\nare real numbers.",
      "solution": "Define the polynomial $pendulum_{marigold}(telescope) = \\sum_{driftwood=0}^{marigold} 2^{driftwood(marigold-driftwood)} telescope^{driftwood}$.  Since\n\\[\npendulum_{1}(telescope) = 1+telescope, \\quad pendulum_{2}(telescope) = 1 + 2telescope + telescope^2 = (1+telescope)^2,\n\\]\nthe claim holds for $marigold=1,2$.  For $marigold \\ge 3$, we show that the quantities\n\\[\npendulum_{marigold}(-2^{-marigold}),\\; pendulum_{marigold}(-2^{-marigold+2}),\\; \\dots,\\; pendulum_{marigold}(-2^{marigold})\n\\]\nalternate in sign; by the intermediate value theorem, this will imply that $pendulum_{marigold}$ has a root in each of the $marigold$ intervals $(- 2^{-marigold}, - 2^{-marigold+2}), \\dots, (- 2^{marigold-2}, -2^{marigold})$, forcing $pendulum_{marigold}$ to have as many distinct real roots as its degree.\n\nFor $lighthouse \\in \\{0,\\dots,marigold\\}$, group the terms of $pendulum_{marigold}(telescope)$ as\n\\begin{align*}\n&\\cdots \\\\\n&+ 2^{(lighthouse-5)(marigold-lighthouse+5)} telescope^{lighthouse-5} + 2^{(lighthouse-4)(marigold-lighthouse+4)} telescope^{lighthouse-4} \\\\\n&+ 2^{(lighthouse-3)(marigold-lighthouse+3)} telescope^{lighthouse-3} + 2^{(lighthouse-2)(marigold-lighthouse+2)} telescope^{lighthouse-2} \\\\\n&+ 2^{(lighthouse-1)(marigold-lighthouse+1)} telescope^{lighthouse-1} + 2^{lighthouse(marigold-lighthouse)} telescope^{lighthouse} + 2^{(lighthouse+1)(marigold-lighthouse-1)} telescope^{lighthouse+1} \\\\\n&+  2^{(lighthouse+2)(marigold-lighthouse-2)} telescope^{lighthouse+2} + 2^{(lighthouse+3)(marigold-lighthouse-3)} telescope^{lighthouse+3} \\\\\n&+2^{(lighthouse+4)(marigold-lighthouse-4)} telescope^{lighthouse+4} + 2^{(lighthouse+5)(marigold-lighthouse-5)} telescope^{lighthouse+5} \\\\\n& \\cdots.\n\\end{align*}\n\nDepending on the parity of $lighthouse$ and of $marigold-lighthouse$, there may be a single monomial left on each end.  When evaluating at $telescope =- 2^{-marigold+2lighthouse}$, the trinomial evaluates to $0$.  In the binomials preceding the trinomial, the right-hand term dominates, so each of these binomials contributes with the sign of $telescope^{lighthouse-2driftwood}$, which is $(-1)^{lighthouse}$.  In the binomials following the trinomial, the left-hand term dominates, so again the contribution has sign $(-1)^{lighthouse}$.\n\nAny monomials which are left over on the ends also contribute with sign $(-1)^{lighthouse}$.  Since $marigold \\ge 3$, there exists at least one contribution other than the trinomial, so $pendulum_{marigold}(- 2^{-marigold+2lighthouse})$ has overall sign $(-1)^{lighthouse}$, proving the claimed alternation.\n\nRemark: Karl Mahlburg suggests an alternate interpretation of the preceding algebra: write $2^{-lighthouse^2} \\; pendulum_{marigold}(2^{-marigold+2lighthouse})$ as\n\\begin{align*}\n&2^{-lighthouse^2} - 2^{-(lighthouse-1)^2} + \\cdots + (-1)^{lighthouse-1} 2^{-1} + (-1)^{lighthouse} 2^{-1}\\\\\n+ &(-1)^{lighthouse} 2^{-1} + (-1)^{lighthouse+1} 2^{-1} + (-1)^{lighthouse+2} 2^{-2} + \\cdots,\n\\end{align*}\nwhere the two central terms $(-1)^{lighthouse} 2^{-1}$ arise from splitting the term arising from $telescope^{lighthouse}$.  Then each row is an alternating series whose sum carries the sign of $(-1)^{lighthouse}$ unless it has only two terms.  Since $marigold \\ge 3$, one of the two sums is forced to be nonzero.\n\nRemark: One of us (Kedlaya) received this problem and solution from David Speyer in 2009 and submitted it to the problem committee."
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "constantvalue",
        "n": "negativeinteger",
        "k": "outsider",
        "j": "fixedvalue",
        "f_n": "exponential"
      },
      "question": "Show that for each positive integer $negativeinteger$, all the roots of the polynomial\n\\[\n\\sum_{outsider=0}^{negativeinteger} 2^{outsider(negativeinteger-outsider)} constantvalue^{outsider}\n\\]\nare real numbers.",
      "solution": "Define the polynomial $exponential(constantvalue) = \\sum_{outsider=0}^{negativeinteger} 2^{outsider(negativeinteger-outsider)} constantvalue^{outsider}$.\\ Since\n\\[\nf_1(constantvalue) = 1+constantvalue,\\ f_2(constantvalue) = 1 + 2constantvalue + constantvalue^2 = (1+constantvalue)^2,\n\\]\nthe claim holds for for $negativeinteger=1,2$. For $negativeinteger \\geq 3$, we show that the quantities\n\\[\nexponential(-2^{-\\negativeinteger}),\\ exponential(-2^{-\\negativeinteger+2}),\\ \\dots,\\ exponential(-2^{\\negativeinteger})\n\\]\nalternate in sign; by the intermediate value theorem, this will imply that $exponential$ has a root in each of the $negativeinteger$ intervals $(- 2^{-\\negativeinteger}, - 2^{-\\negativeinteger+2}), \\dots, (- 2^{\\negativeinteger-2}, -2^{\\negativeinteger})$, forcing $exponential$ to have as many distinct real roots as its degree.\n\nFor $fixedvalue \\in \\{0,\\dots,negativeinteger\\}$, group the terms of $exponential(constantvalue)$ as\n\\begin{align*}\n&\\cdots \\\\\n&+ 2^{(fixedvalue-5)(negativeinteger-fixedvalue+5)} constantvalue^{fixedvalue-5} + 2^{(fixedvalue-4)(negativeinteger-fixedvalue+4)} constantvalue^{fixedvalue-4} \\\\\n&+ 2^{(fixedvalue-3)(negativeinteger-fixedvalue+3)} constantvalue^{fixedvalue-3} + 2^{(fixedvalue-2)(negativeinteger-fixedvalue+2)} constantvalue^{fixedvalue-2} \\\\\n&+ 2^{(fixedvalue-1)(negativeinteger-fixedvalue+1)} constantvalue^{fixedvalue-1} + 2^{fixedvalue(negativeinteger-fixedvalue)} constantvalue^{fixedvalue} + 2^{(fixedvalue+1)(negativeinteger-fixedvalue-1)} constantvalue^{fixedvalue+1} \\\\\n&+  2^{(fixedvalue+2)(negativeinteger-fixedvalue-2)} constantvalue^{fixedvalue+2} + 2^{(fixedvalue+3)(negativeinteger-fixedvalue-3)} constantvalue^{fixedvalue+3} \\\\\n&+2^{(fixedvalue+4)(negativeinteger-fixedvalue-4)} constantvalue^{fixedvalue+4} + 2^{(fixedvalue+5)(negativeinteger-fixedvalue-5)} constantvalue^{fixedvalue+5} \\\\\n& \\cdots.\n\\end{align*}\n\nDepending on the parity of $fixedvalue$ and of $negativeinteger-fixedvalue$, there may be a single monomial left on each end. When evaluating at $constantvalue =- 2^{-\\negativeinteger+2fixedvalue}$, the trinomial evaluates to $0$. In the binomials preceding the trinomial, the right-hand term dominates, so each of these binomials contributes with the sign of $constantvalue^{fixedvalue-2outsider}$, which is $(-1)^{fixedvalue}$. In the binomials following the trinomial, the left-hand term dominates, so again the contribution has sign $(-1)^{fixedvalue}$.\n\nAny monomials which are left over on the ends also contribute with sign $(-1)^{fixedvalue}$. Since $negativeinteger \\geq 3$, there exists at least one contribution other than the trinomial, so $exponential(- 2^{-\\negativeinteger+2fixedvalue})$ has overall sign $(-1)^{fixedvalue}$, proving the claimed alternation.\n\n\\noindent\n\\textbf{Remark:} Karl Mahlburg suggests an alternate interpretation of the preceding algebra: write $2^{-fixedvalue^2} exponential(2^{-\\negativeinteger+2fixedvalue})$ as\n\\begin{align*}\n&2^{-fixedvalue^2} - 2^{-(fixedvalue-1)^2} + \\cdots + (-1)^{fixedvalue-1} 2^{-1} + (-1)^{fixedvalue} 2^{-1}\\\\\n+ &(-1)^{fixedvalue} 2^{-1} + (-1)^{fixedvalue+1} 2^{-1} + (-1)^{fixedvalue+2} 2^{-2} + \\cdots,\n\\end{align*}\nwhere the two central terms $(-1)^{fixedvalue} 2^{-1}$ arise from splitting the term arising from $constantvalue^{fixedvalue}$. Then each row is an alternating series whose sum carries the sign of $(-1)^{fixedvalue}$ unless it has only two terms. Since $negativeinteger \\geq 3$, one of the two sums is forced to be nonzero.\n\n\\noindent\n\\textbf{Remark:} One of us (Kedlaya) received this problem and solution from David Speyer in 2009 and submitted it to the problem committee."
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "n": "hjgrksla",
        "k": "mbvdnjqu",
        "j": "rpthmzsa",
        "f_n": "slkdjfgh"
      },
      "question": "Show that for each positive integer $hjgrksla$, all the roots of the polynomial\n\\[\n\\sum_{mbvdnjqu=0}^{hjgrksla} 2^{mbvdnjqu(hjgrksla-mbvdnjqu)} qzxwvtnp^{mbvdnjqu}\n\\]\nare real numbers.",
      "solution": "Define the polynomial $slkdjfgh(qzxwvtnp) = \\sum_{mbvdnjqu=0}^{hjgrksla} 2^{mbvdnjqu(hjgrksla-mbvdnjqu)} qzxwvtnp^{mbvdnjqu}$.  Since\n\\[\nslkdjfgh_1(qzxwvtnp) = 1+qzxwvtnp,\\qquad slkdjfgh_2(qzxwvtnp) = 1 + 2qzxwvtnp + qzxwvtnp^2 = (1+qzxwvtnp)^2,\n\\]\nthe claim holds for $hjgrksla=1,2$.  For $hjgrksla \\ge 3$, we show that the quantities\n\\[\nslkdjfgh(-2^{-hjgrksla}),\\; slkdjfgh(-2^{-hjgrksla+2}),\\; \\dots,\\; slkdjfgh(-2^{hjgrksla})\n\\]\nalternate in sign; by the intermediate value theorem, this will imply that $slkdjfgh$ has a root in each of the $hjgrksla$ intervals $(-2^{-hjgrksla},-2^{-hjgrksla+2}),\\dots,(-2^{hjgrksla-2},-2^{hjgrksla})$, forcing $slkdjfgh$ to have as many distinct real roots as its degree.\n\nFor $rpthmzsa \\in \\{0,\\dots,hjgrksla\\}$, group the terms of $slkdjfgh(qzxwvtnp)$ as\n\\begin{align*}\n&\\cdots \\\\\n&+ 2^{(rpthmzsa-5)(hjgrksla-rpthmzsa+5)} qzxwvtnp^{rpthmzsa-5} + 2^{(rpthmzsa-4)(hjgrksla-rpthmzsa+4)} qzxwvtnp^{rpthmzsa-4} \\\\\n&+ 2^{(rpthmzsa-3)(hjgrksla-rpthmzsa+3)} qzxwvtnp^{rpthmzsa-3} + 2^{(rpthmzsa-2)(hjgrksla-rpthmzsa+2)} qzxwvtnp^{rpthmzsa-2} \\\\\n&+ 2^{(rpthmzsa-1)(hjgrksla-rpthmzsa+1)} qzxwvtnp^{rpthmzsa-1} + 2^{rpthmzsa(hjgrksla-rpthmzsa)} qzxwvtnp^{rpthmzsa} + 2^{(rpthmzsa+1)(hjgrksla-rpthmzsa-1)} qzxwvtnp^{rpthmzsa+1} \\\\\n&+  2^{(rpthmzsa+2)(hjgrksla-rpthmzsa-2)} qzxwvtnp^{rpthmzsa+2} + 2^{(rpthmzsa+3)(hjgrksla-rpthmzsa-3)} qzxwvtnp^{rpthmzsa+3} \\\\\n&+2^{(rpthmzsa+4)(hjgrksla-rpthmzsa-4)} qzxwvtnp^{rpthmzsa+4} + 2^{(rpthmzsa+5)(hjgrksla-rpthmzsa-5)} qzxwvtnp^{rpthmzsa+5} \\\\\n& \\cdots.\n\\end{align*}\n\nDepending on the parity of $rpthmzsa$ and of $hjgrksla-rpthmzsa$, there may be a single monomial left on each end. When evaluating at $qzxwvtnp=-2^{-hjgrksla+2rpthmzsa}$, the trinomial evaluates to $0$. In the binomials preceding the trinomial, the right-hand term dominates, so each such binomial contributes with the sign of $qzxwvtnp^{rpthmzsa-2mbvdnjqu}$, which is $(-1)^{rpthmzsa}$. In the binomials following the trinomial, the left-hand term dominates, so again the contribution has sign $(-1)^{rpthmzsa}$.\n\nAny monomials left over on the ends also contribute with sign $(-1)^{rpthmzsa}$. Since $hjgrksla \\ge 3$, there exists at least one contribution other than the trinomial, so $slkdjfgh(-2^{-hjgrksla+2rpthmzsa})$ has overall sign $(-1)^{rpthmzsa}$, proving the claimed alternation.\n\n\\noindent\\textbf{Remark:} Karl Mahlburg suggests an alternate interpretation of the preceding algebra: write $2^{-rpthmzsa^2}\\,slkdjfgh(2^{-hjgrksla+2rpthmzsa})$ as\n\\begin{align*}\n&2^{-rpthmzsa^2} - 2^{-(rpthmzsa-1)^2} + \\cdots + (-1)^{rpthmzsa-1}2^{-1} + (-1)^{rpthmzsa}2^{-1} \\\\\n+\\;&(-1)^{rpthmzsa}2^{-1} + (-1)^{rpthmzsa+1}2^{-1} + (-1)^{rpthmzsa+2}2^{-2} + \\cdots,\n\\end{align*}\nwhere the two central terms $(-1)^{rpthmzsa}2^{-1}$ arise from splitting the term coming from $qzxwvtnp^{rpthmzsa}$. Then each row is an alternating series whose sum carries the sign of $(-1)^{rpthmzsa}$ unless it has only two terms. Since $hjgrksla \\ge 3$, one of the two sums is forced to be nonzero.\n\n\\noindent\\textbf{Remark:} One of us (Kedlaya) received this problem and solution from David Speyer in 2009 and submitted it to the problem committee."
    },
    "kernel_variant": {
      "question": "Let\nP_n(x)=\\sum_{k=0}^{n}2^{k(n-k)}x^{k}\\qquad(n\\in\\mathbb N)\nbe the degree–$n$ polynomial introduced above.\n\n(a)  Show that for every positive integer $n$ all the roots of $P_n$ are real and negative.\n\n(b)  Apart from the exceptional case $n=2$, the $n$ roots are in fact distinct and they are neatly located as follows: for every $j=0,1,\\dots ,n-1$ the open interval\n\n\\[I_j\\;=\\;\\bigl(-2^{\\,2j-n+2}\\,,\\,-2^{\\,2j-n}\\bigr)\\]\n\ncontains exactly one root of $P_n$.\n\n(When $n=2$ we have $P_2(x)=1+2x+x^2=(1+x)^2$, so there is a double root at $x = -1$, the common end–point of $I_0$ and $I_1$.)",
      "solution": "Throughout we abbreviate\n\\[f_n(x):=P_n(x)=\\sum_{k=0}^{n}2^{k(n-k)}x^{k}.\\]\nThe cases $n=1,2$ are treated first; afterwards we assume $n\\ge 3$.\n\n1.  Small values.\n   •  $n=1$:  $f_1(x)=1+x$ has the single real root $x=-1$ (this lies in $I_0=(-2,-\\tfrac12)$).\n   •  $n=2$:  $f_2(x)=1+2x+x^2=(1+x)^2$ has a double root $x=-1$.  Part (a) holds, while (b) fails only because the two roots coincide.\n\nFor the remainder fix $n\\ge 3$.\n\n2.  A convenient set of test points.\nPut\n\\[x_j:=-2^{\\,2j-n}\\qquad(j=0,1,\\dots ,n).\\]\nSince $2j-n$ is strictly increasing, $x_0>\\dots> x_n$ and $I_j=(x_{j+1},x_j)$.\nWe shall prove the sign rule\n\\[\\operatorname{sign}f_n(x_j)=(-1)^j\\qquad(0\\le j\\le n).\\tag{2.1}\\]\nBy the Intermediate Value Theorem, (2.1) guarantees exactly one zero of $f_n$ in every $I_j$, giving assertions (a) and (b) for $n\\ge3$.\n\n3.  Evaluation of $f_n$ at the points $x_j$.\nFor fixed $n$ and $j$ put $x=x_j$:\n\\begin{align*}\n2^{k(n-k)}x^k\n   &=2^{k(n-k)}(-2^{2j-n})^k\n   =(-1)^k2^{k(n-k)+k(2j-n)}\\\\\n   &=(-1)^k2^{-k^2+2jk}.       \\qquad(\\!*\\!)\n\\end{align*}\nThe parenthesised equality is obtained because $k(n-k)+k(2j-n)=-k^2+2jk$; note carefully that the term $j^2$ which appeared in the draft was spurious and has been removed.\nNow write $-k^2+2jk=-(k-j)^2+j^2$ to factorise\n\\[2^{k(n-k)}x_j^k=(-1)^k2^{j^{2}}\\,2^{-(k-j)^2}.\\]\nHence\n\\[f_n(x_j)=2^{j^{2}}\\,S_j\\qquad\\text{with}\\qquad S_j:=\\sum_{k=0}^{n}(-1)^k2^{-(k-j)^2}.\\tag{3.1}\\]\nBecause $2^{j^{2}}>0$, $\\operatorname{sign}f_n(x_j)=\\operatorname{sign}S_j$.  Replace the index $m=k-j$ to obtain\n\\[S_j=(-1)^j\\,T_j,\\qquad T_j:=\\sum_{m=-j}^{\\,n-j}(-1)^{m}2^{-m^2}.\\tag{3.2}\\]\nConsequently\n\\[\\operatorname{sign}f_n(x_j)=(-1)^j\\operatorname{sign}T_j.\\tag{3.3}\\]\nWe are left with proving $T_j>0$ for every $j$.\n\n4.  Positivity of $T_j$.\nWrite $p:=j$ and $q:=n-j$ so that\n\\[T_j=\\sum_{m=-p}^{\\,q}a_m\\quad\\text{with}\\quad a_m:=(-1)^m2^{-m^2}.\\tag{4.1}\\]\nNote that $|a_0|=1$ and $|a_{m+1}|<\\tfrac12|a_m|$ for $m\\ge0$; thus $|a_m|$ decreases very fast.\nWe distinguish three cases.\n\n(i) $\\boldsymbol{p=0}$ or $\\boldsymbol{q=0}$  ($j=0$ or $j=n$).\nAssume $p=0$; the other situation is symmetric.  Then $T_0=\\sum_{m=0}^{q}a_m$ is the beginning of the alternating series $1-\\tfrac12+\\tfrac1{16}-\\dots$.  Because the absolute values are strictly decreasing, every partial sum of such a series is at least the magnitude of the first omitted term, hence positive.  Thus $T_0>0$.\n\n(ii) $\\boldsymbol{\\min\\{p,q\\}=1}$  ($j=1$ or $j=n-1$).\nTake $j=1$ (the other case is identical).  Then the permitted indices are $m=-1,0,1,2,\\dots ,q$ with $q\\ge2$ (since $n\\ge3$).\nGroup the first few terms:\n\\[T_1=(1+a_{-1}+a_{1})+a_{2}+R,\\qquad R:=\\sum_{m=3}^{q}a_m.\\]\nBecause $a_{\\pm1}=-\\frac12$ we have $1+a_{-1}+a_{1}=1-1=0$.  Furthermore $a_2=2^{-4}=\\tfrac1{16}>0$.  Using the fast decay in (4.1),\n\\[|R|\\le\\sum_{m=3}^{\\infty}2^{-m^2}<2^{-9}+2^{-16}+\\dots<0.009<\\tfrac1{16}.\\]\nTherefore $T_1>a_2-|R|>0$.\n\n(iii)  $\\boldsymbol{\\min\\{p,q\\}\\ge2}$.\nThen the indices $\\pm1$ and $\\pm2$ all occur.  Separate them:\n\\begin{align*}\nT_j&=1+\\bigl(a_{-1}+a_{1}\\bigr)+\\bigl(a_{-2}+a_{2}\\bigr)+R'\\\\\n    &=1-1+\\frac18+R'\\,=\\,\\frac18+R',\n\\end{align*}\nwhere $R'=\\sum_{|m|\\ge3}a_m$ (all terms with $|m|\\ge3$ that are available).  As in (ii), $|R'|<0.009<\\frac18$, whence $T_j>0$.\n\nIn every case $T_j$ is strictly positive, so by (3.3) the sign pattern (2.1) is established.\n\n5.  Location and simplicity of the zeros for $n\\ge3$.\nBecause $f_n$ changes sign between consecutive points $x_{j+1}$ and $x_j$, it possesses at least one real zero in every interval $I_j=(x_{j+1},x_j)$.  Since there are $n$ such intervals and $\\deg f_n=n$, these are all the zeros.  None of them is multiple (otherwise some $I_j$ would contain more than one root).  All the roots are negative because $x_n<\\cdots <x_0<0$.\n\n6.  Conclusion.\n(a)  For every positive integer $n$ all the roots of $P_n$ are real and negative.\n\n(b)  For $n\\ne2$ the $n$ roots are distinct; for $n\\ge3$ each interval $I_j$ contains exactly one root, and for $n=1$ the unique root lies in $I_0$.  When $n=2$ there is the announced double root at $x=-1$.\n\nThe proof is complete.",
      "_meta": {
        "core_steps": [
          "Verify the claim for the small cases n = 1, 2 by direct expansion.",
          "For n ≥ 3 evaluate f_n at the points x_j = −2^{2j−n} (j = 0,…,n).",
          "At each x_j the three terms with exponents j−1, j, j+1 cancel, and every other pair of symmetric terms has dominant sign (−1)^j.",
          "Hence the values f_n(x_j) alternate in sign.",
          "Intermediate Value Theorem ⇒ one real root in each successive interval (x_j, x_{j+1}); with n intervals this yields n distinct real roots."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "How many extra terms on each side of the central trinomial are shown when grouping the polynomial; any sufficiently large integer works.",
            "original": "5"
          },
          "slot2": {
            "description": "Which initial values of n are settled by brute force before invoking the general argument.",
            "original": "1 and 2"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}