{
  "index": "2017-A-2",
  "type": "ALG",
  "tag": [
    "ALG",
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "Let $Q_0(x) = 1$, $Q_1(x) = x$, and\n\\[\nQ_n(x) = \\frac{(Q_{n-1}(x))^2 - 1}{Q_{n-2}(x)}\n\\]\nfor all $n \\geq 2$. Show that, whenever $n$ is a positive integer, $Q_n(x)$ is equal to a polynomial with integer coefficients.",
  "solution": "\\textbf{First solution.}\nDefine $P_n(x)$ for $P_0(x) = 1$, $P_1(x) = x$, and $P_n(x) = x \nP_{n-1}(x)-P_{n-2}(x)$. We claim that $P_n(x) = Q_n(x)$ for all $n \\geq 0$;\nsince $P_n(x)$ clearly is a polynomial \nwith integer coefficients for all $n$, this will imply the desired result.\n\n Since $\\{P_n\\}$ and $\\{Q_n\\}$ are \nuniquely determined by their respective recurrence relations and the \ninitial conditions $P_0,P_1$ or $Q_0,Q_1$, it suffices to check that \n$\\{P_n\\}$ satisfies the same recurrence as $Q$: that is, \n$(P_{n-1}(x))^2-P_n(x)P_{n-2}(x) = 1$ for all $n \\geq 2$. Here is one \nproof of this: for $n \\geq 1$, define the $2\\times 2$ matrices \n\\[\nM_n = \n\\begin{pmatrix} P_{n-1}(x) & P_n (x) \\\\ P_{n-2}(x) & \nP_{n-1}(x) \\end{pmatrix}, \\quad T = \\begin{pmatrix} x & -1 \\\\ 1 & 0 \\end{pmatrix}\n\\]\nwith $P_{-1}(x) = 0$ (this value being consistent with the recurrence).\nThen $\\det(T) = 1$ and $T M_{n} = M_{n+1}$, so by induction on $n$ we have\n\\[\n(P_{n-1}(x))^2-P_n(x)P_{n-2}(x) = \\det(M_n) = \n\\det(M_1) = 1.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nA similar argument shows that any second-order linear recurrent sequence also satisfies a quadratic second-order recurrence relation.\nA familiar example is the identity $F_{n-1} F_{n+1} - F_n^2 = (-1)^{n}$ for $F_n$ the $n$-th Fibonacci number. \nMore examples come from various classes of \\emph{orthogonal polynomials}, including the Chebyshev polynomials mentioned below.\n\n\\noindent\n\\textbf{Second solution.}\nWe establish directly that $Q_n(x) = x \nQ_{n-1}(x)-Q_{n-2}(x)$, which again suffices. \nFrom the equation\n\\[\n1 = Q_{n-1}(x)^2 - Q_n(x) Q_{n-2}(x) = Q_n(x)^2 - Q_{n+1}(x) Q_{n-1}(x)\n\\]\nwe deduce that\n\\[\nQ_{n-1}(x)(Q_{n-1}(x) + Q_{n+1}(x)) = Q_n(x) (Q_n(x) + Q_{n-2}(x)).\n\\]\nSince $\\deg(Q_n(x)) = n$ by an obvious induction, the polynomials $Q_n(x)$ are all nonzero. We may thus rewrite the previous equation as\n\\[\n\\frac{Q_{n+1}(x) + Q_{n-1}(x)}{Q_n(x)} = \\frac{Q_n(x) + Q_{n-2}(x)}{Q_{n-1}(x)},\n\\]\nmeaning that the rational functions $\\frac{Q_n(x) + Q_{n-2}(x)}{Q_{n-1}(x)}$\nare all equal to a constant value. By taking $n=2$ and computing from the definition that $Q_2(x) = x^2-1$,\nwe find the constant value to be $x$; this yields the desired recurrence.\n\n\\noindent\n\\textbf{Remark:}\nBy induction, one may also obtain the explicit formula\n\\[\nQ_n(x) = \\sum_{k=0}^{\\lfloor n/2 \\rfloor} (-1)^k \\binom{n-k}{k} x^{n-2k}.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nIn light of the explicit formula for $Q_n(x)$,\nKarl Mahlburg suggests the following bijective interpretation of the identity\n$Q_{n-1}(x)^2 - Q_n(x) Q_{n-2}(x) = 1$.\nConsider the set $C_n$ of integer compositions of $n$ with all parts 1 or 2; \nthese are ordered tuples $(c_1, \\dots, c_k)$ such that $c_1 + \\cdots + c_k = n$ and $c_i  \\in \\{1,2\\}$ for all $i$.\nFor a given composition $c$, let $o(c)$ and $d(c)$ denote the number of 1's and 2's, respectively.\nDefine the generating function\n\\[\nR_n(x) = \\sum_{c \\in C_n} x^{o(c)};\n\\]\nthen $R_n(x) = \\sum_{j} \\binom{n-j}{j} x^{n-2j}$, so that $Q_n(x) = i^{-n/2} R_n(ix)$.\n(The polynomials $R_n(x)$ are sometimes called \\emph{Fibonacci polynomials}; they satisfy $R_n(1) = F_n$.\nThis interpretation of $F_n$ as the cardinality of $C_n$ first arose in the study of Sanskrit prosody, specifically the analysis of a line of verse as a sequence of long and short syllables, at least 500 years prior to\nthe work of Fibonacci.)\n\nThe original identity is equivalent to the identity\n\\[\nR_{n+1}(x) R_{n-1}(x) - R_n(x)^2 = (-1)^{n-1}.\n\\]\nThis follows because if we identify the composition $c$ with a tiling of a $1 \\times n$ rectangle by $1 \\times 1$ squares and $1 \\times 2$ dominoes, it is \\emph{almost} a bijection to place two tilings of length $n$ on top of each other, offset by one square, and hinge at the first possible point (which is the first square in either). This only fails when both tilings are all dominoes, which gives the term $(-1)^{n-1}$.\n\n\\noindent\n\\textbf{Remark:}\nThis problem appeared on the 2012 India National Math Olympiad; see\n\\url{https://artofproblemsolving.com/community/c6h1219629}.\nAnother problem based on the same idea is problem A2 from the 1993 Putnam.",
  "vars": [
    "c",
    "c_i",
    "j",
    "k",
    "n",
    "x"
  ],
  "params": [
    "C_n",
    "F_n",
    "M_n",
    "P_n",
    "Q_n",
    "R_n",
    "T"
  ],
  "sci_consts": [
    "i"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "c": "singlec",
        "c_i": "singleci",
        "j": "counterj",
        "k": "counterk",
        "n": "indexn",
        "x": "variablex",
        "C_n": "compsetn",
        "F_n": "fibnumber",
        "M_n": "matrixmn",
        "P_n": "polyseqpn",
        "Q_n": "quotpoly",
        "R_n": "fibpolyn",
        "T": "transmat"
      },
      "question": "Let $quotpoly_0(variablex) = 1$, $quotpoly_1(variablex) = variablex$, and\n\\[\nquotpoly_{indexn}(variablex) = \\frac{(quotpoly_{indexn-1}(variablex))^2 - 1}{quotpoly_{indexn-2}(variablex)}\n\\]\nfor all $indexn \\geq 2$. Show that, whenever $indexn$ is a positive integer, $quotpoly_{indexn}(variablex)$ is equal to a polynomial with integer coefficients.",
      "solution": "\\textbf{First solution.}\nDefine $polyseqpn_{indexn}(variablex)$ for $polyseqpn_0(variablex) = 1$, $polyseqpn_1(variablex) = variablex$, and $polyseqpn_{indexn}(variablex) = variablex \npolyseqpn_{indexn-1}(variablex)-polyseqpn_{indexn-2}(variablex)$. We claim that $polyseqpn_{indexn}(variablex) = quotpoly_{indexn}(variablex)$ for all $indexn \\geq 0$;\nsince $polyseqpn_{indexn}(variablex)$ clearly is a polynomial \nwith integer coefficients for all $indexn$, this will imply the desired result.\n\n Since $\\{polyseqpn_{indexn}\\}$ and $\\{quotpoly_{indexn}\\}$ are \nuniquely determined by their respective recurrence relations and the \ninitial conditions $polyseqpn_0,polyseqpn_1$ or $quotpoly_0,quotpoly_1$, it suffices to check that \n$\\{polyseqpn_{indexn}\\}$ satisfies the same recurrence as $Q$: that is, \n$(polyseqpn_{indexn-1}(variablex))^2-polyseqpn_{indexn}(variablex)polyseqpn_{indexn-2}(variablex) = 1$ for all $indexn \\geq 2$. Here is one \nproof of this: for $indexn \\geq 1$, define the $2\\times 2$ matrices \n\\[\nmatrixmn_{indexn} = \n\\begin{pmatrix} polyseqpn_{indexn-1}(variablex) & polyseqpn_{indexn} (variablex) \\\\ polyseqpn_{indexn-2}(variablex) & \npolyseqpn_{indexn-1}(variablex) \\end{pmatrix}, \\quad transmat = \\begin{pmatrix} variablex & -1 \\\\ 1 & 0 \\end{pmatrix}\n\\]\nwith $polyseqpn_{-1}(variablex) = 0$ (this value being consistent with the recurrence).\nThen $\\det(transmat) = 1$ and $transmat\\, matrixmn_{indexn} = matrixmn_{indexn+1}$, so by induction on $indexn$ we have\n\\[\n(polyseqpn_{indexn-1}(variablex))^2-polyseqpn_{indexn}(variablex)polyseqpn_{indexn-2}(variablex) = \\det(matrixmn_{indexn}) = \n\\det(matrixmn_{1}) = 1.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nA similar argument shows that any second-order linear recurrent sequence also satisfies a quadratic second-order recurrence relation.\nA familiar example is the identity $fibnumber_{indexn-1} fibnumber_{indexn+1} - fibnumber_{indexn}^2 = (-1)^{indexn}$ for $fibnumber_{indexn}$ the $indexn$-th Fibonacci number. \nMore examples come from various classes of \\emph{orthogonal polynomials}, including the Chebyshev polynomials mentioned below.\n\n\\noindent\n\\textbf{Second solution.}\nWe establish directly that $quotpoly_{indexn}(variablex) = variablex \nquotpoly_{indexn-1}(variablex)-quotpoly_{indexn-2}(variablex)$, which again suffices. \nFrom the equation\n\\[\n1 = quotpoly_{indexn-1}(variablex)^2 - quotpoly_{indexn}(variablex) quotpoly_{indexn-2}(variablex) = quotpoly_{indexn}(variablex)^2 - quotpoly_{indexn+1}(variablex) quotpoly_{indexn-1}(variablex)\n\\]\nwe deduce that\n\\[\nquotpoly_{indexn-1}(variablex)(quotpoly_{indexn-1}(variablex) + quotpoly_{indexn+1}(variablex)) = quotpoly_{indexn}(variablex) (quotpoly_{indexn}(variablex) + quotpoly_{indexn-2}(variablex)).\n\\]\nSince $\\deg(quotpoly_{indexn}(variablex)) = indexn$ by an obvious induction, the polynomials $quotpoly_{indexn}(variablex)$ are all nonzero. We may thus rewrite the previous equation as\n\\[\n\\frac{quotpoly_{indexn+1}(variablex) + quotpoly_{indexn-1}(variablex)}{quotpoly_{indexn}(variablex)} = \\frac{quotpoly_{indexn}(variablex) + quotpoly_{indexn-2}(variablex)}{quotpoly_{indexn-1}(variablex)},\n\\]\nmeaning that the rational functions $\\frac{quotpoly_{indexn}(variablex) + quotpoly_{indexn-2}(variablex)}{quotpoly_{indexn-1}(variablex)}$\nare all equal to a constant value. By taking $indexn=2$ and computing from the definition that $quotpoly_{2}(variablex) = variablex^2-1$,\nwe find the constant value to be $variablex$; this yields the desired recurrence.\n\n\\noindent\n\\textbf{Remark:}\nBy induction, one may also obtain the explicit formula\n\\[\nquotpoly_{indexn}(variablex) = \\sum_{counterk=0}^{\\lfloor indexn/2 \\rfloor} (-1)^{counterk} \\binom{indexn-counterk}{counterk} variablex^{indexn-2counterk}.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nIn light of the explicit formula for $quotpoly_{indexn}(variablex)$,\nKarl Mahlburg suggests the following bijective interpretation of the identity\n$quotpoly_{indexn-1}(variablex)^2 - quotpoly_{indexn}(variablex) quotpoly_{indexn-2}(variablex) = 1$.\nConsider the set $compsetn_{indexn}$ of integer compositions of $indexn$ with all parts 1 or 2; \nthese are ordered tuples $(singlec_1, \\dots, singlec_{counterk})$ such that $singlec_1 + \\cdots + singlec_{counterk} = indexn$ and $singleci  \\in \\{1,2\\}$ for all $i$.\nFor a given composition $singlec$, let $o(singlec)$ and $d(singlec)$ denote the number of 1's and 2's, respectively.\nDefine the generating function\n\\[\nfibpolyn_{indexn}(variablex) = \\sum_{singlec \\in compsetn_{indexn}} variablex^{o(singlec)};\n\\]\nthen $fibpolyn_{indexn}(variablex) = \\sum_{counterj} \\binom{indexn-counterj}{counterj} variablex^{indexn-2counterj}$, so that $quotpoly_{indexn}(variablex) = i^{-indexn/2} fibpolyn_{indexn}(i\\,variablex)$.\n(The polynomials $fibpolyn_{indexn}(variablex)$ are sometimes called \\emph{Fibonacci polynomials}; they satisfy $fibpolyn_{indexn}(1) = fibnumber_{indexn}$.\nThis interpretation of $fibnumber_{indexn}$ as the cardinality of $compsetn_{indexn}$ first arose in the study of Sanskrit prosody, specifically the analysis of a line of verse as a sequence of long and short syllables, at least 500 years prior to\nthe work of Fibonacci.)\n\nThe original identity is equivalent to the identity\n\\[\nfibpolyn_{indexn+1}(variablex) fibpolyn_{indexn-1}(variablex) - fibpolyn_{indexn}(variablex)^2 = (-1)^{indexn-1}.\n\\]\nThis follows because if we identify the composition $singlec$ with a tiling of a $1 \\times indexn$ rectangle by $1 \\times 1$ squares and $1 \\times 2$ dominoes, it is \\emph{almost} a bijection to place two tilings of length $indexn$ on top of each other, offset by one square, and hinge at the first possible point (which is the first square in either). This only fails when both tilings are all dominoes, which gives the term $(-1)^{indexn-1}$.\n\n\\noindent\n\\textbf{Remark:}\nThis problem appeared on the 2012 India National Math Olympiad; see\n\\url{https://artofproblemsolving.com/community/c6h1219629}.\nAnother problem based on the same idea is problem A2 from the 1993 Putnam."
    },
    "descriptive_long_confusing": {
      "map": {
        "c": "watermelon",
        "c_i": "rainforest",
        "j": "philosopher",
        "k": "toothpick",
        "n": "pineapple",
        "x": "celestial",
        "C_n": "cartwheel",
        "F_n": "butterfly",
        "M_n": "semaphore",
        "P_n": "nightingale",
        "Q_n": "waterfall",
        "R_n": "hedgehog",
        "T": "moonlight"
      },
      "question": "Let $Q_0(celestial) = 1$, $Q_1(celestial) = celestial$, and\n\\[\nQ_{pineapple}(celestial) = \\frac{(Q_{pineapple-1}(celestial))^2 - 1}{Q_{pineapple-2}(celestial)}\n\\]\nfor all $pineapple \\geq 2$. Show that, whenever $pineapple$ is a positive integer, $Q_{pineapple}(celestial)$ is equal to a polynomial with integer coefficients.",
      "solution": "\\textbf{First solution.}\nDefine $nightingale_{pineapple}(celestial)$ for $nightingale_0(celestial) = 1$, $nightingale_1(celestial) = celestial$, and $nightingale_{pineapple}(celestial) = celestial \nnightingale_{pineapple-1}(celestial)-nightingale_{pineapple-2}(celestial)$. We claim that $nightingale_{pineapple}(celestial) = waterfall_{pineapple}(celestial)$ for all $pineapple \\geq 0$; since $nightingale_{pineapple}(celestial)$ clearly is a polynomial \nwith integer coefficients for all $pineapple$, this will imply the desired result.\n\nSince $\\{nightingale_{pineapple}\\}$ and $\\{waterfall_{pineapple}\\}$ are \nuniquely determined by their respective recurrence relations and the \ninitial conditions $nightingale_0,nightingale_1$ or $Q_0,Q_1$, it suffices to check that \n$\\{nightingale_{pineapple}\\}$ satisfies the same recurrence as $Q$: that is, \n$(nightingale_{pineapple-1}(celestial))^2-nightingale_{pineapple}(celestial)nightingale_{pineapple-2}(celestial) = 1$ for all $pineapple \\geq 2$. Here is one \nproof of this: for $pineapple \\geq 1$, define the $2\\times 2$ matrices \n\\[\nsemaphore_{pineapple} = \n\\begin{pmatrix} nightingale_{pineapple-1}(celestial) & nightingale_{pineapple}(celestial) \\\\ nightingale_{pineapple-2}(celestial) & \nnightingale_{pineapple-1}(celestial) \\end{pmatrix}, \\quad moonlight = \\begin{pmatrix} celestial & -1 \\\\ 1 & 0 \\end{pmatrix}\n\\]\nwith $nightingale_{-1}(celestial) = 0$ (this value being consistent with the recurrence).\nThen $\\det(moonlight) = 1$ and $moonlight\\,semaphore_{pineapple} = semaphore_{pineapple+1}$, so by induction on $pineapple$ we have\n\\[\n(nightingale_{pineapple-1}(celestial))^2-nightingale_{pineapple}(celestial)nightingale_{pineapple-2}(celestial) = \\det(semaphore_{pineapple}) = \n\\det(semaphore_1) = 1.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nA similar argument shows that any second-order linear recurrent sequence also satisfies a quadratic second-order recurrence relation.\nA familiar example is the identity $F_{pineapple-1} F_{pineapple+1} - F_{pineapple}^2 = (-1)^{pineapple}$ for $F_{pineapple}$ the $pineapple$-th Fibonacci number. \nMore examples come from various classes of \\emph{orthogonal polynomials}, including the Chebyshev polynomials mentioned below.\n\n\\noindent\n\\textbf{Second solution.}\nWe establish directly that $Q_{pineapple}(celestial) = celestial \nQ_{pineapple-1}(celestial)-Q_{pineapple-2}(celestial)$, which again suffices. \nFrom the equation\n\\[\n1 = Q_{pineapple-1}(celestial)^2 - Q_{pineapple}(celestial) Q_{pineapple-2}(celestial) = Q_{pineapple}(celestial)^2 - Q_{pineapple+1}(celestial) Q_{pineapple-1}(celestial)\n\\]\nwe deduce that\n\\[\nQ_{pineapple-1}(celestial)(Q_{pineapple-1}(celestial) + Q_{pineapple+1}(celestial)) = Q_{pineapple}(celestial) (Q_{pineapple}(celestial) + Q_{pineapple-2}(celestial)).\n\\]\nSince $\\deg(Q_{pineapple}(celestial)) = pineapple$ by an obvious induction, the polynomials $Q_{pineapple}(celestial)$ are all nonzero. We may thus rewrite the previous equation as\n\\[\n\\frac{Q_{pineapple+1}(celestial) + Q_{pineapple-1}(celestial)}{Q_{pineapple}(celestial)} = \\frac{Q_{pineapple}(celestial) + Q_{pineapple-2}(celestial)}{Q_{pineapple-1}(celestial)},\n\\]\nmeaning that the rational functions $\\frac{Q_{pineapple}(celestial) + Q_{pineapple-2}(celestial)}{Q_{pineapple-1}(celestial)}$\nare all equal to a constant value. By taking $pineapple=2$ and computing from the definition that $Q_2(celestial) = celestial^2-1$,\nwe find the constant value to be $celestial$; this yields the desired recurrence.\n\n\\noindent\n\\textbf{Remark:}\nBy induction, one may also obtain the explicit formula\n\\[\nQ_{pineapple}(celestial) = \\sum_{toothpick=0}^{\\lfloor pineapple/2 \\rfloor} (-1)^{toothpick} \\binom{pineapple-toothpick}{toothpick} celestial^{pineapple-2\\,toothpick}.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nIn light of the explicit formula for $Q_{pineapple}(celestial)$,\nKarl Mahlburg suggests the following bijective interpretation of the identity\n$Q_{pineapple-1}(celestial)^2 - Q_{pineapple}(celestial) Q_{pineapple-2}(celestial) = 1$.\nConsider the set $cartwheel$ of integer compositions of $pineapple$ with all parts 1 or 2; \nthese are ordered tuples $(watermelon_1, \\dots, watermelon_{toothpick})$ such that $watermelon_1 + \\cdots + watermelon_{toothpick} = pineapple$ and $rainforest  \\in \\{1,2\\}$ for all $i$.\nFor a given composition $watermelon$, let $o(watermelon)$ and $d(watermelon)$ denote the number of 1's and 2's, respectively.\nDefine the generating function\n\\[\nhedgehog_{pineapple}(celestial) = \\sum_{watermelon \\in cartwheel} celestial^{o(watermelon)};\n\\]\nthen $hedgehog_{pineapple}(celestial) = \\sum_{philosopher} \\binom{pineapple-philosopher}{philosopher} celestial^{pineapple-2\\,philosopher}$, so that $Q_{pineapple}(celestial) = i^{-pineapple/2} hedgehog_{pineapple}(i celestial)$.\n(The polynomials $hedgehog_{pineapple}(celestial)$ are sometimes called \\emph{Fibonacci polynomials}; they satisfy $hedgehog_{pineapple}(1) = butterfly$.\nThis interpretation of $butterfly$ as the cardinality of $cartwheel$ first arose in the study of Sanskrit prosody, specifically the analysis of a line of verse as a sequence of long and short syllables, at least 500 years prior to\nthe work of Fibonacci.)\n\nThe original identity is equivalent to the identity\n\\[\nhedgehog_{pineapple+1}(celestial) hedgehog_{pineapple-1}(celestial) - hedgehog_{pineapple}(celestial)^2 = (-1)^{pineapple-1}.\n\\]\nThis follows because if we identify the composition $watermelon$ with a tiling of a $1 \\times pineapple$ rectangle by $1 \\times 1$ squares and $1 \\times 2$ dominoes, it is \\emph{almost} a bijection to place two tilings of length $pineapple$ on top of each other, offset by one square, and hinge at the first possible point (which is the first square in either). This only fails when both tilings are all dominoes, which gives the term $(-1)^{pineapple-1}$.\n\n\\noindent\n\\textbf{Remark:}\nThis problem appeared on the 2012 India National Math Olympiad; see\n\\url{https://artofproblemsolving.com/community/c6h1219629}.\nAnother problem based on the same idea is problem A2 from the 1993 Putnam."
    },
    "descriptive_long_misleading": {
      "map": {
        "c": "chaosness",
        "c_i": "chaosnessi",
        "j": "finishline",
        "k": "terminator",
        "n": "infinity",
        "x": "constant",
        "C_n": "disassembly_n",
        "F_n": "defibrillator_n",
        "M_n": "unmatrix_n",
        "P_n": "nonpolynomial_n",
        "Q_n": "antipolynomial_n",
        "R_n": "antifibonacci_n",
        "T": "scalarzero"
      },
      "question": "Let $antipolynomial_0(constant) = 1$, $antipolynomial_1(constant) = constant$, and\n\\[\nantipolynomial_{\\infinity}(constant) = \\frac{(antipolynomial_{\\infinity-1}(constant))^2 - 1}{antipolynomial_{\\infinity-2}(constant)}\n\\]\nfor all $\\infinity \\geq 2$. Show that, whenever $\\infinity$ is a positive integer, $antipolynomial_{\\infinity}(constant)$ is equal to a polynomial with integer coefficients.",
      "solution": "\\textbf{First solution.}\nDefine $nonpolynomial_{\\infinity}(constant)$ for $nonpolynomial_0(constant) = 1$, $nonpolynomial_1(constant) = constant$, and $nonpolynomial_{\\infinity}(constant) = constant \\\nnonpolynomial_{\\infinity-1}(constant)-nonpolynomial_{\\infinity-2}(constant)$. We claim that $nonpolynomial_{\\infinity}(constant) = antipolynomial_{\\infinity}(constant)$ for all $\\infinity \\geq 0$;\nsince $nonpolynomial_{\\infinity}(constant)$ clearly is a polynomial \nwith integer coefficients for all $\\infinity$, this will imply the desired result.\n\n Since $\\{nonpolynomial_{\\infinity}\\}$ and $\\{antipolynomial_{\\infinity}\\}$ are \nuniquely determined by their respective recurrence relations and the \ninitial conditions $nonpolynomial_0,nonpolynomial_1$ or $antipolynomial_0,antipolynomial_1$, it suffices to check that \n$\\{nonpolynomial_{\\infinity}\\}$ satisfies the same recurrence as $antipolynomial$: that is, \n$(nonpolynomial_{\\infinity-1}(constant))^2-nonpolynomial_{\\infinity}(constant)nonpolynomial_{\\infinity-2}(constant) = 1$ for all $\\infinity \\geq 2$. Here is one \nproof of this: for $\\infinity \\geq 1$, define the $2\\times 2$ matrices \n\\[\nunmatrix_{\\infinity} = \n\\begin{pmatrix} nonpolynomial_{\\infinity-1}(constant) & nonpolynomial_{\\infinity} (constant) \\\\ nonpolynomial_{\\infinity-2}(constant) & \nnonpolynomial_{\\infinity-1}(constant) \\end{pmatrix}, \\quad scalarzero = \\begin{pmatrix} constant & -1 \\\\ 1 & 0 \\end{pmatrix}\n\\]\nwith $nonpolynomial_{-1}(constant) = 0$ (this value being consistent with the recurrence).\nThen $\\det(scalarzero) = 1$ and $scalarzero \\unmatrix_{\\infinity} = \\unmatrix_{\\infinity+1}$, so by induction on $\\infinity$ we have\n\\[\n(nonpolynomial_{\\infinity-1}(constant))^2-nonpolynomial_{\\infinity}(constant)nonpolynomial_{\\infinity-2}(constant) = \\det(\\unmatrix_{\\infinity}) = \n\\det(\\unmatrix_1) = 1.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nA similar argument shows that any second-order linear recurrent sequence also satisfies a quadratic second-order recurrence relation.\nA familiar example is the identity $defibrillator_{\\infinity-1} defibrillator_{\\infinity+1} - defibrillator_{\\infinity}^2 = (-1)^{\\infinity}$ for $defibrillator_{\\infinity}$ the $\\infinity$-th Fibonacci number. \nMore examples come from various classes of \\emph{orthogonal polynomials}, including the Chebyshev polynomials mentioned below.\n\n\\noindent\n\\textbf{Second solution.}\nWe establish directly that $antipolynomial_{\\infinity}(constant) = constant \nantipolynomial_{\\infinity-1}(constant)-antipolynomial_{\\infinity-2}(constant)$, which again suffices. \nFrom the equation\n\\[\n1 = antipolynomial_{\\infinity-1}(constant)^2 - antipolynomial_{\\infinity}(constant) antipolynomial_{\\infinity-2}(constant) = antipolynomial_{\\infinity}(constant)^2 - antipolynomial_{\\infinity+1}(constant) antipolynomial_{\\infinity-1}(constant)\n\\]\nwe deduce that\n\\[\nantipolynomial_{\\infinity-1}(constant)(antipolynomial_{\\infinity-1}(constant) + antipolynomial_{\\infinity+1}(constant)) = antipolynomial_{\\infinity}(constant) (antipolynomial_{\\infinity}(constant) + antipolynomial_{\\infinity-2}(constant)).\n\\]\nSince $\\deg(antipolynomial_{\\infinity}(constant)) = \\infinity$ by an obvious induction, the polynomials $antipolynomial_{\\infinity}(constant)$ are all nonzero. We may thus rewrite the previous equation as\n\\[\n\\frac{antipolynomial_{\\infinity+1}(constant) + antipolynomial_{\\infinity-1}(constant)}{antipolynomial_{\\infinity}(constant)} = \\frac{antipolynomial_{\\infinity}(constant) + antipolynomial_{\\infinity-2}(constant)}{antipolynomial_{\\infinity-1}(constant)},\n\\]\nmeaning that the rational functions $\\frac{antipolynomial_{\\infinity}(constant) + antipolynomial_{\\infinity-2}(constant)}{antipolynomial_{\\infinity-1}(constant)}$\nare all equal to a constant value. By taking $\\infinity=2$ and computing from the definition that $antipolynomial_2(constant) = constant^2-1$,\nwe find the constant value to be $constant$; this yields the desired recurrence.\n\n\\noindent\n\\textbf{Remark:}\nBy induction, one may also obtain the explicit formula\n\\[\nantipolynomial_{\\infinity}(constant) = \\sum_{terminator=0}^{\\lfloor \\infinity/2 \\rfloor} (-1)^{terminator} \\binom{\\infinity-terminator}{terminator} constant^{\\infinity-2terminator}.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nIn light of the explicit formula for $antipolynomial_{\\infinity}(constant)$,\nKarl Mahlburg suggests the following bijective interpretation of the identity\n$antipolynomial_{\\infinity-1}(constant)^2 - antipolynomial_{\\infinity}(constant) antipolynomial_{\\infinity-2}(constant) = 1$.\nConsider the set $disassembly_{\\infinity}$ of integer compositions of $\\infinity$ with all parts 1 or 2; \nthese are ordered tuples $(chaosness_1, \\dots, chaosness_{terminator})$ such that $chaosness_1 + \\cdots + chaosness_{terminator} = \\infinity$ and $chaosnessi  \\in \\{1,2\\}$ for all $i$.\nFor a given composition $chaosness$, let $o(chaosness)$ and $d(chaosness)$ denote the number of 1's and 2's, respectively.\nDefine the generating function\n\\[\nantifibonacci_{\\infinity}(constant) = \\sum_{chaosness \\in disassembly_{\\infinity}} constant^{o(chaosness)};\n\\]\nthen $antifibonacci_{\\infinity}(constant) = \\sum_{finishline} \\binom{\\infinity-finishline}{finishline} constant^{\\infinity-2finishline}$, so that $antipolynomial_{\\infinity}(constant) = i^{-\\infinity/2} antifibonacci_{\\infinity}(i constant)$.\n(The polynomials $antifibonacci_{\\infinity}(constant)$ are sometimes called \\emph{Fibonacci polynomials}; they satisfy $antifibonacci_{\\infinity}(1) = defibrillator_{\\infinity}$.\nThis interpretation of $defibrillator_{\\infinity}$ as the cardinality of $disassembly_{\\infinity}$ first arose in the study of Sanskrit prosody, specifically the analysis of a line of verse as a sequence of long and short syllables, at least 500 years prior to\nthe work of Fibonacci.)\n\nThe original identity is equivalent to the identity\n\\[\nantifibonacci_{\\infinity+1}(constant) antifibonacci_{\\infinity-1}(constant) - antifibonacci_{\\infinity}(constant)^2 = (-1)^{\\infinity-1}.\n\\]\nThis follows because if we identify the composition $chaosness$ with a tiling of a $1 \\times \\infinity$ rectangle by $1 \\times 1$ squares and $1 \\times 2$ dominoes, it is \\emph{almost} a bijection to place two tilings of length $\\infinity$ on top of each other, offset by one square, and hinge at the first possible point (which is the first square in either). This only fails when both tilings are all dominoes, which gives the term $(-1)^{\\infinity-1}$.\n\n\\noindent\n\\textbf{Remark:}\nThis problem appeared on the 2012 India National Math Olympiad; see\n\\url{https://artofproblemsolving.com/community/c6h1219629}.\nAnother problem based on the same idea is problem A2 from the 1993 Putnam."
    },
    "garbled_string": {
      "map": {
        "c": "qzxwvtnp",
        "c_i": "hjgrksla",
        "j": "nrktuvgh",
        "k": "plodmfse",
        "n": "vajkebtu",
        "x": "yqfdslrm",
        "C_n": "bwcerhla",
        "F_n": "zoqmktps",
        "M_n": "sgwhxelo",
        "P_n": "ufvadzor",
        "Q_n": "rdlixqma",
        "R_n": "twxzspau",
        "T": "kmvjoqre"
      },
      "question": "Let $Q_0(yqfdslrm) = 1$, $Q_1(yqfdslrm) = yqfdslrm$, and\n\\[\nQ_{vajkebtu}(yqfdslrm) = \\frac{(Q_{vajkebtu-1}(yqfdslrm))^2 - 1}{Q_{vajkebtu-2}(yqfdslrm)}\n\\]\nfor all $vajkebtu \\geq 2$. Show that, whenever $vajkebtu$ is a positive integer, $rdlixqma(yqfdslrm)$ is equal to a polynomial with integer coefficients.",
      "solution": "\\textbf{First solution.}\nDefine $ufvadzor(yqfdslrm)$ for $P_0(yqfdslrm) = 1$, $P_1(yqfdslrm) = yqfdslrm$, and $ufvadzor(yqfdslrm) = yqfdslrm \nP_{vajkebtu-1}(yqfdslrm)-P_{vajkebtu-2}(yqfdslrm)$. We claim that $ufvadzor(yqfdslrm) = rdlixqma(yqfdslrm)$ for all $vajkebtu \\geq 0$;\nsince $ufvadzor(yqfdslrm)$ clearly is a polynomial \nwith integer coefficients for all $vajkebtu$, this will imply the desired result.\n\n Since $\\{ufvadzor\\}$ and $\\{rdlixqma\\}$ are \nuniquely determined by their respective recurrence relations and the \ninitial conditions $P_0,P_1$ or $Q_0,Q_1$, it suffices to check that \n$\\{ufvadzor\\}$ satisfies the same recurrence as $Q$: that is, \n$(P_{vajkebtu-1}(yqfdslrm))^2-ufvadzor(yqfdslrm)P_{vajkebtu-2}(yqfdslrm) = 1$ for all $vajkebtu \\geq 2$. Here is one \nproof of this: for $vajkebtu \\geq 1$, define the $2\\times 2$ matrices \n\\[\nsgwhxelo = \n\\begin{pmatrix} P_{vajkebtu-1}(yqfdslrm) & ufvadzor (yqfdslrm) \\\\ P_{vajkebtu-2}(yqfdslrm) & \nP_{vajkebtu-1}(yqfdslrm) \\end{pmatrix}, \\quad kmvjoqre = \\begin{pmatrix} yqfdslrm & -1 \\\\ 1 & 0 \\end{pmatrix}\n\\]\nwith $P_{-1}(yqfdslrm) = 0$ (this value being consistent with the recurrence).\nThen $\\det(kmvjoqre) = 1$ and $kmvjoqre sgwhxelo = M_{vajkebtu+1}$, so by induction on $vajkebtu$ we have\n\\[\n(P_{vajkebtu-1}(yqfdslrm))^2-ufvadzor(yqfdslrm)P_{vajkebtu-2}(yqfdslrm) = \\det(sgwhxelo) = \n\\det(M_1) = 1.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nA similar argument shows that any second-order linear recurrent sequence also satisfies a quadratic second-order recurrence relation.\nA familiar example is the identity $F_{n-1} F_{n+1} - F_n^2 = (-1)^{n}$ for $F_n$ the $n$-th Fibonacci number. \nMore examples come from various classes of \\emph{orthogonal polynomials}, including the Chebyshev polynomials mentioned below.\n\n\\noindent\n\\textbf{Second solution.}\nWe establish directly that $rdlixqma(yqfdslrm) = yqfdslrm \nQ_{vajkebtu-1}(yqfdslrm)-Q_{vajkebtu-2}(yqfdslrm)$, which again suffices. \nFrom the equation\n\\[\n1 = Q_{vajkebtu-1}(yqfdslrm)^2 - rdlixqma(yqfdslrm) Q_{vajkebtu-2}(yqfdslrm) = rdlixqma(yqfdslrm)^2 - Q_{vajkebtu+1}(yqfdslrm) Q_{vajkebtu-1}(yqfdslrm)\n\\]\nwe deduce that\n\\[\nQ_{vajkebtu-1}(yqfdslrm)(Q_{vajkebtu-1}(yqfdslrm) + Q_{vajkebtu+1}(yqfdslrm)) = rdlixqma(yqfdslrm) (rdlixqma(yqfdslrm) + Q_{vajkebtu-2}(yqfdslrm)).\n\\]\nSince $\\deg(rdlixqma(yqfdslrm)) = vajkebtu$ by an obvious induction, the polynomials $rdlixqma(yqfdslrm)$ are all nonzero. We may thus rewrite the previous equation as\n\\[\n\\frac{Q_{vajkebtu+1}(yqfdslrm) + Q_{vajkebtu-1}(yqfdslrm)}{rdlixqma(yqfdslrm)} = \\frac{rdlixqma(yqfdslrm) + Q_{vajkebtu-2}(yqfdslrm)}{Q_{vajkebtu-1}(yqfdslrm)},\n\\]\nmeaning that the rational functions $\\frac{rdlixqma(yqfdslrm) + Q_{vajkebtu-2}(yqfdslrm)}{Q_{vajkebtu-1}(yqfdslrm)}$\nare all equal to a constant value. By taking $vajkebtu=2$ and computing from the definition that $Q_2(yqfdslrm) = yqfdslrm^2-1$,\nwe find the constant value to be $yqfdslrm$; this yields the desired recurrence.\n\n\\noindent\n\\textbf{Remark:}\nBy induction, one may also obtain the explicit formula\n\\[\nrdlixqma(yqfdslrm) = \\sum_{plodmfse=0}^{\\lfloor vajkebtu/2 \\rfloor} (-1)^{plodmfse} \\binom{vajkebtu-plodmfse}{plodmfse} yqfdslrm^{vajkebtu-2plodmfse}.\n\\]\n\n\\noindent\n\\textbf{Remark:}\nIn light of the explicit formula for rdlixqma(yqfdslrm),\nKarl Mahlburg suggests the following bijective interpretation of the identity\n$Q_{vajkebtu-1}(yqfdslrm)^2 - rdlixqma(yqfdslrm) Q_{vajkebtu-2}(yqfdslrm) = 1$.\nConsider the set $bwcerhla$ of integer compositions of $vajkebtu$ with all parts 1 or 2; \nthese are ordered tuples $(qzxwvtnp_1, \\dots, qzxwvtnp_{plodmfse})$ such that $qzxwvtnp_1 + \\cdots + qzxwvtnp_{plodmfse} = vajkebtu$ and $hjgrksla  \\in \\{1,2\\}$ for all $i$.\nFor a given composition $qzxwvtnp$, let $o(qzxwvtnp)$ and $d(qzxwvtnp)$ denote the number of 1's and 2's, respectively.\nDefine the generating function\n\\[\ntwxzspau(yqfdslrm) = \\sum_{qzxwvtnp \\in bwcerhla} yqfdslrm^{o(qzxwvtnp)};\n\\]\nthen $twxzspau(yqfdslrm) = \\sum_{nrktuvgh} \\binom{vajkebtu-nrktuvgh}{nrktuvgh} yqfdslrm^{vajkebtu-2nrktuvgh}$, so that $rdlixqma(yqfdslrm) = i^{-vajkebtu/2} twxzspau(i yqfdslrm)$.\n(The polynomials $twxzspau(yqfdslrm)$ are sometimes called \\emph{Fibonacci polynomials}; they satisfy $twxzspau(1) = zoqmktps$.\nThis interpretation of $zoqmktps$ as the cardinality of $bwcerhla$ first arose in the study of Sanskrit prosody, specifically the analysis of a line of verse as a sequence of long and short syllables, at least 500 years prior to\nthe work of Fibonacci.)\n\nThe original identity is equivalent to the identity\n\\[\nR_{vajkebtu+1}(yqfdslrm) R_{vajkebtu-1}(yqfdslrm) - R_{vajkebtu}(yqfdslrm)^2 = (-1)^{vajkebtu-1}.\n\\]\nThis follows because if we identify the composition $qzxwvtnp$ with a tiling of a $1 \\times vajkebtu$ rectangle by $1 \\times 1$ squares and $1 \\times 2$ dominoes, it is \\emph{almost} a bijection to place two tilings of length $vajkebtu$ on top of each other, offset by one square, and hinge at the first possible point (which is the first square in either). This only fails when both tilings are all dominoes, which gives the term $(-1)^{vajkebtu-1}$.\n\n\\noindent\n\\textbf{Remark:}\nThis problem appeared on the 2012 India National Math Olympiad; see\n\\url{https://artofproblemsolving.com/community/c6h1219629}.\nAnother problem based on the same idea is problem A2 from the 1993 Putnam."
    },
    "kernel_variant": {
      "question": "Let\n\\[\nQ_0(x)=1,\\qquad Q_1(x)=x,\\qquad \nQ_n(x)=\\frac{\\bigl(Q_{n-1}(x)\\bigr)^2-(-1)^{n-1}}{\\,Q_{n-2}(x)}\\qquad(n\\ge 2).\n\\]\nShow that every $Q_n(x)$ is an integer-coefficient polynomial.",
      "solution": "Step 1.  Define the auxiliary sequence of polynomials\n\n    P₀(x)=1,  P₁(x)=x,\n    Pₙ(x)=x·Pₙ₋₁(x)+Pₙ₋₂(x)\n\nfor n≥2.  Clearly this is a linear recurrence with integer‐polynomial coefficients, so each Pₙ(x)∈ℤ[x].\n\nStep 2.  Form the matrices\n\n    Mₙ = [ Pₙ₋₁(x)   Pₙ(x)  \n           Pₙ₋₂(x)   Pₙ₋₁(x) ],  \n    T   = [   x       1     \n              1       0   ].\n\nOne checks at once that Mₙ₊₁ = T⋅Mₙ, and det T = x·0–1·1 = –1.\n\nStep 3.  Since P₋₁ := x·P₀–P₁ = 0, we have\n\n    M₁ = [ 1   x  \n            0   1 ],\n\nso det M₁=1.  Hence by induction det Mₙ = (–1)ⁿ⁻¹ for all n≥1.  On the other hand\n\n    det Mₙ = Pₙ₋₁² – Pₙ·Pₙ₋₂,\n\nso\n\n    Pₙ₋₁(x)² – Pₙ(x)·Pₙ₋₂(x) = (–1)ⁿ⁻¹.\n\nStep 4.  Rearranging gives exactly\n\n    Pₙ(x) = [Pₙ₋₁(x)² – (–1)ⁿ⁻¹]/Pₙ₋₂(x),\n\nwhich is the defining recurrence for Qₙ(x).  Since P₀=Q₀ and P₁=Q₁, uniqueness of such a second‐order recurrence yields Pₙ≡Qₙ.\n\nStep 5.  Each Pₙ(x) lies in ℤ[x], hence so does Qₙ(x).  This completes the proof that every Qₙ(x) is an integer‐coefficient polynomial.",
      "_meta": {
        "core_steps": [
          "Introduce a second–order linear sequence Pₙ with integer coefficients (P₀=1, P₁=x,  Pₙ = xPₙ₋₁ − Pₙ₋₂).",
          "Package (Pₙ₋₂,Pₙ₋₁,Pₙ) into 2×2 matrices Mₙ and note Mₙ₊₁ = T·Mₙ with det T = 1.",
          "From det Mₙ = det M₁ = 1 deduce the quadratic invariant (Pₙ₋₁)² − PₙPₙ₋₂ = 1 for every n ≥ 2.",
          "Observe that this invariant is exactly the recurrence that defines Qₙ, so the two sequences coincide by the shared initial data.",
          "Since Pₙ obeys a linear recurrence with integer coefficients, every Qₙ is an integer-coefficient polynomial."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Constant appearing in the quadratic invariant and in the numerator of Qₙ’s definition; equal to det M₁.",
            "original": "1"
          },
          "slot2": {
            "description": "Sign/scale on the Pₙ₋₂ term in the linear recurrence (equivalently, the upper-right entry of T).  Changing −1 to any non-zero integer c still yields the same argument with det T = −c.",
            "original": "−1"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}