{
  "index": "2014-A-1",
  "type": "ANA",
  "tag": [
    "ANA",
    "NT"
  ],
  "difficulty": "",
  "question": "Prove that every nonzero coefficient of the Taylor series of\n\\[\n(1 - x + x^2)e^x\n\\]\nabout $x=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.",
  "solution": "The coefficient of $x^n$ in the Taylor series of $(1-x+x^2)e^x$ for \n$n=0,1,2$ is $1,0,\\frac{1}{2}$, respectively. For $n\\geq 3$, the coefficient of \n$x^n$ is\n\\begin{align*}\n\\frac{1}{n!} - \\frac{1}{(n-1)!} + \\frac{1}{(n-2)!}\n&= \\frac{1-n+n(n-1)}{n!} \\\\\n&= \\frac{n-1}{n(n-2)!}.\n\\end{align*}\nIf $n-1$ is prime, then the lowest-terms numerator is clearly either 1 or the prime $n-1$ (and in fact the latter, since $n-1$ is relatively prime to $n$ and to $(n-2)!$).\n If $n-1$ is composite,\neither it can be written as $ab$ for some $a \\neq b$, in which case both $a$ and $b$ appear separately in $(n-2)!$ and so the numerator is $1$,\nor $n-1 = p^2$ for some prime $p$, in which case $p$ appears in $(n-2)!$\nand so the numerator is either 1 or $p$. (In the latter case, the numerator is actually 1 unless $p=2$, as in all other cases both $p$ and $2p$ appear in $(n-2)!$.)",
  "vars": [
    "x",
    "n",
    "a",
    "b",
    "p"
  ],
  "params": [],
  "sci_consts": [
    "e"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "unknownx",
        "n": "integern",
        "a": "divisora",
        "b": "divisorb",
        "p": "primep"
      },
      "question": "Prove that every nonzero coefficient of the Taylor series of\n\\[\n(1 - unknownx + unknownx^2)e^{unknownx}\n\\]\nabout $unknownx=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.",
      "solution": "The coefficient of $unknownx^{integern}$ in the Taylor series of $(1-unknownx+unknownx^2)e^{unknownx}$ for \n$integern=0,1,2$ is $1,0,\\frac{1}{2}$, respectively. For $integern\\geq 3$, the coefficient of \n$unknownx^{integern}$ is\n\\begin{align*}\n\\frac{1}{integern!} - \\frac{1}{(integern-1)!} + \\frac{1}{(integern-2)!}\n&= \\frac{1-integern+integern(integern-1)}{integern!} \\\\\n&= \\frac{integern-1}{integern(integern-2)!}.\n\\end{align*}\nIf $integern-1$ is prime, then the lowest-terms numerator is clearly either 1 or the prime $integern-1$ (and in fact the latter, since $integern-1$ is relatively prime to $integern$ and to $(integern-2)!$).\n If $integern-1$ is composite,\neither it can be written as $divisora divisorb$ for some $divisora \\neq divisorb$, in which case both $divisora$ and $divisorb$ appear separately in $(integern-2)!$ and so the numerator is $1$,\nor $integern-1 = primep^2$ for some prime $primep$, in which case $primep$ appears in $(integern-2)!$\nand so the numerator is either 1 or $primep$. (In the latter case, the numerator is actually 1 unless $primep=2$, as in all other cases both $primep$ and $2primep$ appear in $(integern-2)!$.)"
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "velocity",
        "n": "treasury",
        "a": "lanterns",
        "b": "harvests",
        "p": "citadels"
      },
      "question": "Prove that every nonzero coefficient of the Taylor series of\n\\[\n(1 - velocity + velocity^2)e^{velocity}\n\\]\nabout $velocity=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.",
      "solution": "The coefficient of $velocity^{treasury}$ in the Taylor series of $(1-velocity+velocity^2)e^{velocity}$ for \n$treasury=0,1,2$ is $1,0,\\frac{1}{2}$, respectively. For $treasury\\geq 3$, the coefficient of \n$velocity^{treasury}$ is\n\\begin{align*}\n\\frac{1}{treasury!} - \\frac{1}{(treasury-1)!} + \\frac{1}{(treasury-2)!}\n&= \\frac{1-treasury+treasury(treasury-1)}{treasury!} \\\\\n&= \\frac{treasury-1}{treasury(treasury-2)!}.\n\\end{align*}\nIf $treasury-1$ is prime, then the lowest-terms numerator is clearly either 1 or the prime $treasury-1$ (and in fact the latter, since $treasury-1$ is relatively prime to $treasury$ and to $(treasury-2)!$).\n If $treasury-1$ is composite,\neither it can be written as $lanterns harvests$ for some $lanterns \\neq harvests$, in which case both $lanterns$ and $harvests$ appear separately in $(treasury-2)!$ and so the numerator is $1$,\nor $treasury-1 = citadels^2$ for some prime $citadels$, in which case $citadels$ appears in $(treasury-2)!$\nand so the numerator is either 1 or $citadels$. (In the latter case, the numerator is actually 1 unless $citadels=2$, as in all other cases both $citadels$ and $2citadels$ appear in $(treasury-2)!$.)"
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "fixedvalue",
        "n": "continuous",
        "a": "multiple",
        "b": "wholevalue",
        "p": "composite"
      },
      "question": "Prove that every nonzero coefficient of the Taylor series of\n\\[\n(1 - fixedvalue + fixedvalue^2)e^{fixedvalue}\n\\]\nabout $fixedvalue=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.",
      "solution": "The coefficient of $fixedvalue^{continuous}$ in the Taylor series of $(1-fixedvalue+fixedvalue^2)e^{fixedvalue}$ for \n$continuous=0,1,2$ is $1,0,\\frac{1}{2}$, respectively. For $continuous\\geq 3$, the coefficient of \n$fixedvalue^{continuous}$ is\n\\begin{align*}\n\\frac{1}{continuous!} - \\frac{1}{(continuous-1)!} + \\frac{1}{(continuous-2)!}\n&= \\frac{1-continuous+continuous(continuous-1)}{continuous!} \\\\\n&= \\frac{continuous-1}{continuous(continuous-2)!}.\n\\end{align*}\nIf $continuous-1$ is prime, then the lowest-terms numerator is clearly either 1 or the prime $continuous-1$ (and in fact the latter, since $continuous-1$ is relatively prime to $continuous$ and to $(continuous-2)!$).\n If $continuous-1$ is composite,\neither it can be written as $multiplewholevalue$ for some $multiple \\neq wholevalue$, in which case both $multiple$ and $wholevalue$ appear separately in $(continuous-2)!$ and so the numerator is $1$,\nor $continuous-1 = composite^2$ for some prime $composite$, in which case $composite$ appears in $(continuous-2)!$\nand so the numerator is either 1 or $composite$. (In the latter case, the numerator is actually 1 unless $composite=2$, as in all other cases both $composite$ and $2composite$ appear in $(continuous-2)!$.)"
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "n": "hjgrksla",
        "a": "vxmleqpd",
        "b": "ncytwraf",
        "p": "uglsnbke"
      },
      "question": "Problem:\n<<<\nProve that every nonzero coefficient of the Taylor series of\n\\[\n(1 - qzxwvtnp + qzxwvtnp^2)e^{qzxwvtnp}\n\\]\nabout $qzxwvtnp=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.\n>>>\n",
      "solution": "Solution:\n<<<\nThe coefficient of $qzxwvtnp^{hjgrksla}$ in the Taylor series of $(1-qzxwvtnp+qzxwvtnp^2)e^{qzxwvtnp}$ for \n$hjgrksla=0,1,2$ is $1,0,\\frac{1}{2}$, respectively. For $hjgrksla\\geq 3$, the coefficient of \n$qzxwvtnp^{hjgrksla}$ is\n\\begin{align*}\n\\frac{1}{hjgrksla!} - \\frac{1}{(hjgrksla-1)!} + \\frac{1}{(hjgrksla-2)!}\n&= \\frac{1-hjgrksla+hjgrksla(hjgrksla-1)}{hjgrksla!} \\\\\n&= \\frac{hjgrksla-1}{hjgrksla(hjgrksla-2)!}.\n\\end{align*}\nIf $hjgrksla-1$ is prime, then the lowest-terms numerator is clearly either 1 or the prime $hjgrksla-1$ (and in fact the latter, since $hjgrksla-1$ is relatively prime to $hjgrksla$ and to $(hjgrksla-2)!$).\n If $hjgrksla-1$ is composite,\neither it can be written as $vxmleqpd ncytwraf$ for some $vxmleqpd \\neq ncytwraf$, in which case both $vxmleqpd$ and $ncytwraf$ appear separately in $(hjgrksla-2)!$ and so the numerator is $1$,\nor $hjgrksla-1 = uglsnbke^2$ for some prime $uglsnbke$, in which case $uglsnbke$ appears in $(hjgrksla-2)!$\nand so the numerator is either 1 or $uglsnbke$. (In the latter case, the numerator is actually 1 unless $uglsnbke=2$, as in all other cases both $uglsnbke$ and $2uglsnbke$ appear in $(hjgrksla-2)!$.)\n>>>"
    },
    "kernel_variant": {
      "question": "Let\n\na)  Expand\n        (1−x+x²)eˣ = ∑_{n=0}^{∞} c_n x^n\n   and determine the first six coefficients c₀ , c₁ , … , c₅.\n\nb)  For every integer n ≥ 6 write the rational number c_n in lowest terms and prove that its numerator is either 1 or a (positive) prime number.",
      "solution": "Part (a)\nThe exponential series is eˣ = ∑_{m=0}^{∞} x^m / m!.  Multiplying term-by-term by 1−x+x² gives\n  (1−x+x²)eˣ = ∑_{m=0}^{∞} x^m / m! − ∑_{m=0}^{∞} x^{m+1}/m! + ∑_{m=0}^{∞} x^{m+2}/m!.\nCollecting the coefficient of xⁿ (n ≥ 2) we obtain\n   c_n = 1/n! − 1/(n−1)! + 1/(n−2)! .\nFor n = 0,1 the coefficient is read off directly:\n   c₀ = 1,  c₁ = 1 − 1 = 0.\nEvaluating for n = 2,…,5:\n   c₂ = 1/2! − 1/1! + 1/0! = ½ − 1 + 1 = ½,\n   c₃ = 1/6 − 1/2 + 1   = 4/6 = 2/3,\n   c₄ = 1/24 − 1/6 + ½  = 9/24 = 3/8,\n   c₅ = 1/120 − 1/24 + 1/6 = 16/120 = 2/15.\nThus\n   c₀ = 1, c₁ = 0, c₂ = ½, c₃ = 2/3, c₄ = 3/8, c₅ = 2/15.\n\nPart (b)\nFor n ≥ 2 rewrite the expression found above:\n   c_n = 1/n! − 1/(n−1)! + 1/(n−2)! = (1 − n + n(n−1))/n! = (n−1)/(n (n−2)!).\nPut\n   d := n − 1, m := n − 2  (so that n ≥ 6 ⇒ m ≥ 4).\nHence\n   c_n = d /(n·m!).\nWe reduce this fraction.  Because consecutive integers are coprime, gcd(d,n)=1, so every common divisor of numerator and denominator must lie in gcd(d,m!). We distinguish two cases.\n\nCase 1: d is prime.\nIn this case d > m, for otherwise d would be a prime ≤ m dividing m!, contradicting d ∤ m!.  Thus gcd(d,m!)=1 and the fraction is already in lowest terms:\n   c_n = d /(n·m!),\nwhose numerator is the prime d.\n\nCase 2: d is composite.\nWrite the prime–power factorisation d=∏_{i} p_i^{e_i}.  Because d=m+1, each p_i satisfies p_i ≤ d/2 ≤ m.  (If one of the p_i equalled m+1 it would equal d itself, contradicting the assumption that d is composite.)\nFor any such prime p:=p_i we compare the exponent of p in d with that in m! using Legendre’s formula\n   ν_p(m!) = ⌊m/p⌋ + ⌊m/p²⌋ + ⌊m/p³⌋ + … .\nSince p ≤ m and m ≥ 4, the first term ⌊m/p⌋ is at least 1; repeating the estimate inductively shows ν_p(m!) ≥ e_i.  Consequently every prime power dividing d also divides m!, i.e. d | m! .  Therefore gcd(d,m!) = d and after cancelling we get\n   c_n = 1 /( n·m!/d ),\nwhose numerator equals 1.\n\nCombining Cases 1 and 2 we conclude that, for every n ≥ 6, the coefficient c_n written in lowest terms has numerator 1 when n−1 is composite and has numerator n−1 when n−1 is prime.  Hence the numerator is always 1 or a (positive) prime number, completing the proof.",
      "_meta": {
        "core_steps": [
          "Write general coefficient as (1/n!) − 1/(n−1)! + 1/(n−2)!",
          "Algebraically simplify to (n−1)/(n·(n−2)!)",
          "Observe gcd(n−1,n)=1 and test whether prime factors of n−1 already lie in (n−2)!",
          "Case-split on n−1 (prime vs composite; composite further to product or square) to see what survives after cancellation"
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Exact small indices handled separately before the general formula is invoked",
            "original": "n = 0, 1, 2"
          },
          "slot2": {
            "description": "Chosen cut-off for applying the closed-form coefficient",
            "original": "n ≥ 3"
          },
          "slot3": {
            "description": "How the composite case is subdivided (distinct factors vs perfect square)",
            "original": "ab with a ≠ b  OR  p²"
          },
          "slot4": {
            "description": "Explicit singling-out of the exceptional square-prime p = 2",
            "original": "p = 2"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}