{
  "index": "1985-A-5",
  "type": "ANA",
  "tag": [
    "ANA",
    "ALG"
  ],
  "difficulty": "",
  "question": "Let $I_m = \\int_0^{2\\pi} \\cos(x)\\cos(2x)\\cdots \\cos(mx)\\,dx$. For\nwhich integers $m$, $1 \\leq m \\leq 10$ is $I_m \\neq 0$?",
  "solution": "Solution. By de Moivre's Theorem \\( \\left(\\cos \\theta+i \\sin \\theta=e^{i \\theta}\\right. \\), [Spv, Ch. 24]), we have\n\\[\nI_{m}=\\int_{0}^{2 \\pi} \\prod_{k=1}^{m}\\left(\\frac{e^{i k x}+e^{-i k x}}{2}\\right) d x=2^{-m} \\sum_{\\epsilon_{k}= \\pm 1} \\int_{0}^{2 \\pi} e^{i\\left(\\epsilon_{1}+2 \\epsilon_{2}+\\cdots+m \\epsilon_{m}\\right) x} d x\n\\]\nwhere the sum ranges over the \\( 2^{m} m \\)-tuples \\( \\left(\\epsilon_{1}, \\ldots, \\epsilon_{m}\\right) \\) with \\( \\epsilon_{k}= \\pm 1 \\) for each \\( k \\). For integers \\( t \\),\n\\[\n\\int_{0}^{2 \\pi} e^{i t x} d x=\\left\\{\\begin{array}{l}\n2 \\pi, \\text { if } t=0 \\\\\n0, \\text { otherwise }\n\\end{array}\\right.\n\\]\n\nThus \\( I_{m} \\neq 0 \\) if and only 0 can be written as\n\\[\n\\epsilon_{1}+2 \\epsilon_{2}+\\cdots+m \\epsilon_{m}\n\\]\nfor some \\( \\epsilon_{1}, \\ldots, \\epsilon_{m} \\in\\{1,-1\\} \\). If such \\( \\epsilon_{k} \\) exist, then\n\\[\n0=\\epsilon_{1}+2 \\epsilon_{2}+\\cdots+m \\epsilon_{m} \\equiv 1+2+\\cdots+m=\\frac{m(m+1)}{2} \\quad(\\bmod 2)\n\\]\nso \\( m(m+1) \\equiv 0(\\bmod 4) \\), which forces \\( m \\equiv 0 \\) or \\( 3(\\bmod 4) \\). Conversely, if \\( m \\equiv 0 \\) \\( (\\bmod 4) \\), then\n\\[\n0=(1-2-3+4)+(5-6-7+8)+\\cdots+((m-3)-(m-2)-(m-1)+m),\n\\]\nand if \\( m \\equiv 3(\\bmod 4) \\),\n\\[\n0=(1+2-3)+(4-5-6+7)+(8-9-10+11)+((m-3)-(m-2)-(m-1)+m) .\n\\]\n\nThus \\( I_{m} \\neq 0 \\) if and only \\( m \\equiv 0 \\) or \\( 3(\\bmod 4) \\). The integers \\( m \\) between 1 and 10 satisfying this condition are \\( 3,4,7,8 \\).\n\nReinterpretation. This is a question in Fourier analysis. The function\n\\[\n\\cos (x) \\cos (2 x) \\cdots \\cos (m x)\n\\]\nis continuous and periodic with period \\( 2 \\pi \\), so it can be written as a Fourier series\n\\[\n\\cos (x) \\cos (2 x) \\cdots \\cos (m x)=a_{0}+\\sum_{j=1}^{\\infty} b_{j} \\cos (j x)+\\sum_{k=1}^{\\infty} c_{k} \\sin (k x) .\n\\]\n\nThe question asks: For which integers \\( m \\) between 1 and 10 is \\( a_{0} \\) nonzero? By similar methods, one can show that:\n(i) \\( c_{k}=0 \\) for all \\( k \\), and\n(ii) \\( b_{j}=p / 2^{m-1} \\), where \\( p \\) is the number of ways to express \\( j \\) as \\( \\epsilon_{1}+2 \\epsilon_{2}+\\cdots+m \\epsilon_{m} \\), where \\( \\epsilon_{1}, \\ldots, \\epsilon_{m} \\in\\{1,-1\\} \\).\nIn particular, only finitely many \\( b_{j} \\) are nonzero, and \\( a_{0}+\\sum_{j} b_{j}=1 \\).",
  "vars": [
    "x",
    "k",
    "t",
    "j"
  ],
  "params": [
    "I_m",
    "m",
    "\\\\theta",
    "\\\\epsilon_k",
    "a_0",
    "b_j",
    "c_k",
    "p"
  ],
  "sci_consts": [
    "i"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "anglevar",
        "k": "prodindex",
        "t": "integervar",
        "j": "fourierindex",
        "I_m": "integralvalue",
        "m": "multiplicity",
        "\\theta": "angletheta",
        "\\epsilon_k": "signvar",
        "a_0": "coeffzero",
        "b_j": "coeffbee",
        "c_k": "coeffcee",
        "p": "waycount"
      },
      "question": "Let $integralvalue = \\int_0^{2\\pi} \\cos(anglevar)\\cos(2\\,anglevar)\\cdots \\cos(multiplicity\\,anglevar)\\,d anglevar$. For which integers multiplicity, $1 \\leq multiplicity \\leq 10$ is $integralvalue \\neq 0$?",
      "solution": "Solution. By de Moivre's Theorem \\( \\left(\\cos angletheta+i \\sin angletheta=e^{i\\,angletheta}\\right. \\), [Spv, Ch. 24]), we have\n\\[\nintegralvalue = \\int_{0}^{2 \\pi} \\prod_{prodindex=1}^{multiplicity}\\left(\\frac{e^{i\\, prodindex\\, anglevar}+e^{-i\\, prodindex\\, anglevar}}{2}\\right) d anglevar = 2^{-\\multiplicity} \\sum_{signvar_{prodindex}= \\pm 1} \\int_{0}^{2 \\pi} e^{i\\left(signvar_{1}+2\\, signvar_{2}+\\cdots+\\multiplicity\\, signvar_{multiplicity}\\right) anglevar} d anglevar\n\\]\nwhere the sum ranges over the \\( 2^{\\multiplicity}\\multiplicity \\)-tuples \\( \\left(signvar_{1}, \\ldots, signvar_{multiplicity}\\right) \\) with \\( signvar_{prodindex}= \\pm 1 \\) for each \\( prodindex \\). For integers \\( integervar \\),\n\\[\n\\int_{0}^{2 \\pi} e^{i\\, integervar\\, anglevar} d anglevar=\\left\\{\\begin{array}{l}\n2 \\pi, \\text { if } integervar=0 \\\\\n0, \\text { otherwise }\n\\end{array}\\right.\n\\]\nThus \\( integralvalue \\neq 0 \\) if and only if 0 can be written as\n\\[\nsignvar_{1}+2\\, signvar_{2}+\\cdots+\\multiplicity\\, signvar_{multiplicity}\n\\]\nfor some \\( signvar_{1}, \\ldots, signvar_{multiplicity} \\in\\{1,-1\\} \\). If such \\( signvar_{prodindex} \\) exist, then\n\\[\n0=signvar_{1}+2\\, signvar_{2}+\\cdots+\\multiplicity\\, signvar_{multiplicity} \\equiv 1+2+\\cdots+\\multiplicity=\\frac{\\multiplicity(\\multiplicity+1)}{2} \\quad(\\bmod 2)\n\\]\nso \\( \\multiplicity(\\multiplicity+1) \\equiv 0(\\bmod 4) \\), which forces \\( \\multiplicity \\equiv 0 \\) or \\( 3(\\bmod 4) \\). Conversely, if \\( \\multiplicity \\equiv 0 \\) \\( (\\bmod 4) \\), then\n\\[\n0=(1-2-3+4)+(5-6-7+8)+\\cdots+((\\multiplicity-3)-(\\multiplicity-2)-(\\multiplicity-1)+\\multiplicity),\n\\]\nand if \\( \\multiplicity \\equiv 3(\\bmod 4) \\),\n\\[\n0=(1+2-3)+(4-5-6+7)+(8-9-10+11)+((\\multiplicity-3)-(\\multiplicity-2)-(\\multiplicity-1)+\\multiplicity) .\n\\]\nThus \\( integralvalue \\neq 0 \\) if and only if \\( \\multiplicity \\equiv 0 \\) or \\( 3(\\bmod 4) \\). The integers \\( \\multiplicity \\) between 1 and 10 satisfying this condition are \\( 3,4,7,8 \\).\n\nReinterpretation. This is a question in Fourier analysis. The function\n\\[\n\\cos (anglevar) \\cos (2\\, anglevar) \\cdots \\cos (\\multiplicity\\, anglevar)\n\\]\nis continuous and periodic with period \\( 2 \\pi \\), so it can be written as a Fourier series\n\\[\n\\cos (anglevar) \\cos (2\\, anglevar) \\cdots \\cos (\\multiplicity\\, anglevar)=coeffzero+\\sum_{fourierindex=1}^{\\infty} coeffbee_{fourierindex} \\cos (fourierindex\\, anglevar)+\\sum_{prodindex=1}^{\\infty} coeffcee_{prodindex} \\sin (prodindex\\, anglevar) .\n\\]\nThe question asks: For which integers \\( \\multiplicity \\) between 1 and 10 is \\( coeffzero \\) nonzero? By similar methods, one can show that: (i) \\( coeffcee_{prodindex}=0 \\) for all \\( prodindex \\), and (ii) \\( coeffbee_{fourierindex}=waycount / 2^{\\multiplicity-1} \\), where waycount is the number of ways to express fourierindex as \\( signvar_{1}+2\\, signvar_{2}+\\cdots+\\multiplicity\\, signvar_{multiplicity} \\), where \\( signvar_{1}, \\ldots, signvar_{multiplicity} \\in\\{1,-1\\} \\). In particular, only finitely many \\( coeffbee_{fourierindex} \\) are nonzero, and \\( coeffzero+\\sum_{fourierindex} coeffbee_{fourierindex}=1 \\)."
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "longitude",
        "k": "lighthouse",
        "t": "sandstorm",
        "j": "whirlwind",
        "I_m": "spectrum",
        "m": "semaphore",
        "\\theta": "asteroid",
        "\\epsilon_k": "undertow",
        "a_0": "landscape",
        "b_j": "guitarist",
        "c_k": "waterfall",
        "p": "roadblock"
      },
      "question": "Let $spectrum = \\int_0^{2\\pi} \\cos(longitude)\\cos(2longitude)\\cdots \\cos(semaphore\\,longitude)\\,d longitude$. For which integers semaphore, $1 \\leq semaphore \\leq 10$ is $spectrum \\neq 0$?",
      "solution": "Solution. By de Moivre's Theorem \\( (\\cos asteroid+i \\sin asteroid=e^{i asteroid}), [Spv, Ch. 24]), we have\n\\[\nspectrum=\\int_{0}^{2 \\pi} \\prod_{lighthouse=1}^{semaphore}\\left(\\frac{e^{i\\,lighthouse\\,longitude}+e^{-i\\,lighthouse\\,longitude}}{2}\\right) d longitude=2^{-semaphore} \\sum_{undertow_{lighthouse}= \\pm 1} \\int_{0}^{2 \\pi} e^{i\\left(undertow_{1}+2\\,undertow_{2}+\\cdots+semaphore\\,undertow_{semaphore}\\right) longitude} d longitude\n\\]\nwhere the sum ranges over the \\( 2^{semaphore} semaphore\\)-tuples \\( (undertow_{1}, \\ldots , undertow_{semaphore}) \\) with \\( undertow_{lighthouse}= \\pm 1 \\) for each \\( lighthouse \\). For integers \\( sandstorm \\),\n\\[\n\\int_{0}^{2 \\pi} e^{i\\,sandstorm\\,longitude} d longitude=\n\\begin{cases}\n2 \\pi, & \\text { if } sandstorm=0 \\\\\n0, & \\text { otherwise }\n\\end{cases}\n\\]\nThus \\( spectrum \\neq 0 \\) if and only if 0 can be written as\n\\[\nundertow_{1}+2\\,undertow_{2}+\\cdots+semaphore\\,undertow_{semaphore}\n\\]\nfor some \\( undertow_{1}, \\ldots , undertow_{semaphore} \\in \\{1,-1\\} \\). If such \\( undertow_{lighthouse} \\) exist, then\n\\[\n0=undertow_{1}+2\\,undertow_{2}+\\cdots+semaphore\\,undertow_{semaphore} \\equiv 1+2+\\cdots+semaphore=\\frac{semaphore(semaphore+1)}{2} \\quad(\\bmod 2)\n\\]\nso \\( semaphore(semaphore+1) \\equiv 0(\\bmod 4) \\), which forces \\( semaphore \\equiv 0 \\) or \\( 3(\\bmod 4) \\). Conversely, if \\( semaphore \\equiv 0 \\,(\\bmod 4) \\), then\n\\[\n0=(1-2-3+4)+(5-6-7+8)+\\cdots+((semaphore-3)-(semaphore-2)-(semaphore-1)+semaphore),\n\\]\nand if \\( semaphore \\equiv 3(\\bmod 4) \\),\n\\[\n0=(1+2-3)+(4-5-6+7)+(8-9-10+11)+((semaphore-3)-(semaphore-2)-(semaphore-1)+semaphore).\n\\]\nThus \\( spectrum \\neq 0 \\) if and only if \\( semaphore \\equiv 0 \\) or \\( 3(\\bmod 4) \\). The integers semaphore between 1 and 10 satisfying this condition are 3,4,7,8.\n\nReinterpretation. This is a question in Fourier analysis. The function\n\\[\n\\cos (longitude) \\cos (2 longitude) \\cdots \\cos (semaphore\\,longitude)\n\\]\nis continuous and periodic with period \\( 2 \\pi \\), so it can be written as a Fourier series\n\\[\n\\cos (longitude) \\cos (2 longitude) \\cdots \\cos (semaphore\\,longitude)=landscape+\\sum_{whirlwind=1}^{\\infty} guitarist \\cos (whirlwind\\,longitude)+\\sum_{lighthouse=1}^{\\infty} waterfall \\sin (lighthouse\\,longitude).\n\\]\nThe question asks: For which integers semaphore between 1 and 10 is landscape nonzero? By similar methods, one can show that:\n(i) waterfall = 0 for all indices, and\n(ii) guitarist = roadblock / 2^{semaphore-1}, where roadblock is the number of ways to express a given index as \\( undertow_{1}+2\\,undertow_{2}+\\cdots+semaphore\\,undertow_{semaphore} \\), with \\( undertow_{1}, \\ldots , undertow_{semaphore} \\in \\{1,-1\\} \\).\nIn particular, only finitely many guitarist are nonzero, and \\( landscape+\\sum guitarist =1 \\)."
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "fixedpoint",
        "k": "aggregate",
        "t": "staticval",
        "j": "complete",
        "I_m": "derivsum",
        "m": "fraction",
        "\\theta": "distance",
        "\\epsilon_k": "steadplus",
        "a_0": "variable",
        "b_j": "mutedtone",
        "c_k": "steadcoef",
        "p": "emptiness"
      },
      "question": "Let $derivsum = \\int_0^{2\\pi} \\cos(fixedpoint)\\cos(2fixedpoint)\\cdots \\cos(fraction fixedpoint)\\,d fixedpoint$. For\nwhich integers $fraction$, $1 \\leq fraction \\leq 10$ is $derivsum \\neq 0$?",
      "solution": "Solution. By de Moivre's Theorem \\( \\left(\\cos distance+i \\sin distance=e^{i distance}\\right. \\), [Spv, Ch. 24]), we have\n\\[\nderivsum=\\int_{0}^{2 \\pi} \\prod_{aggregate=1}^{fraction}\\left(\\frac{e^{i aggregate fixedpoint}+e^{-i aggregate fixedpoint}}{2}\\right) d fixedpoint=2^{-fraction} \\sum_{steadplus_{aggregate}= \\pm 1} \\int_{0}^{2 \\pi} e^{i\\left(steadplus_{1}+2\\,steadplus_{2}+\\cdots+fraction\\,steadplus_{fraction}\\right) fixedpoint} d fixedpoint\n\\]\nwhere the sum ranges over the \\( 2^{fraction} fraction \\)-tuples \\( \\left(steadplus_{1}, \\ldots, steadplus_{fraction}\\right) \\) with \\( steadplus_{aggregate}= \\pm 1 \\) for each \\( aggregate \\). For integers \\( staticval \\),\n\\[\n\\int_{0}^{2 \\pi} e^{i staticval fixedpoint} d fixedpoint=\\left\\{\\begin{array}{l}\n2 \\pi, \\text { if } staticval=0 \\\\\n0, \\text { otherwise }\n\\end{array}\\right.\n\\]\n\nThus \\( derivsum \\neq 0 \\) if and only 0 can be written as\n\\[\nsteadplus_{1}+2\\,steadplus_{2}+\\cdots+fraction\\,steadplus_{fraction}\n\\]\nfor some \\( steadplus_{1}, \\ldots, steadplus_{fraction} \\in\\{1,-1\\} \\). If such \\( steadplus_{aggregate} \\) exist, then\n\\[\n0=steadplus_{1}+2\\,steadplus_{2}+\\cdots+fraction\\,steadplus_{fraction} \\equiv 1+2+\\cdots+fraction=\\frac{fraction(fraction+1)}{2} \\quad(\\bmod 2)\n\\]\nso \\( fraction(fraction+1) \\equiv 0(\\bmod 4) \\), which forces \\( fraction \\equiv 0 \\) or \\( 3(\\bmod 4) \\). Conversely, if \\( fraction \\equiv 0 \\) \\( (\\bmod 4) \\), then\n\\[\n0=(1-2-3+4)+(5-6-7+8)+\\cdots+((fraction-3)-(fraction-2)-(fraction-1)+fraction),\n\\]\nand if \\( fraction \\equiv 3(\\bmod 4) \\),\n\\[\n0=(1+2-3)+(4-5-6+7)+(8-9-10+11)+((fraction-3)-(fraction-2)-(fraction-1)+fraction) .\n\\]\n\nThus \\( derivsum \\neq 0 \\) if and only \\( fraction \\equiv 0 \\) or \\( 3(\\bmod 4) \\). The integers \\( fraction \\) between 1 and 10 satisfying this condition are \\( 3,4,7,8 \\).\n\nReinterpretation. This is a question in Fourier analysis. The function\n\\[\n\\cos (fixedpoint) \\cos (2 fixedpoint) \\cdots \\cos (fraction fixedpoint)\n\\]\nis continuous and periodic with period \\( 2 \\pi \\), so it can be written as a Fourier series\n\\[\n\\cos (fixedpoint) \\cos (2 fixedpoint) \\cdots \\cos (fraction fixedpoint)=variable+\\sum_{complete=1}^{\\infty} mutedtone \\cos (complete fixedpoint)+\\sum_{aggregate=1}^{\\infty} steadcoef \\sin (aggregate fixedpoint) .\n\\]\n\nThe question asks: For which integers \\( fraction \\) between 1 and 10 is \\( variable \\) nonzero? By similar methods, one can show that:\n(i) \\( steadcoef=0 \\) for all \\( aggregate \\), and\n(ii) \\( mutedtone=emptiness / 2^{fraction-1} \\), where \\( emptiness \\) is the number of ways to express \\( complete \\) as \\( steadplus_{1}+2\\,steadplus_{2}+\\cdots+fraction\\,steadplus_{fraction} \\), where \\( steadplus_{1}, \\ldots, steadplus_{fraction} \\in\\{1,-1\\} \\).\nIn particular, only finitely many \\( mutedtone \\) are nonzero, and \\( variable+\\sum_{complete} mutedtone=1 \\)."
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "k": "hjgrksla",
        "t": "mzdnfrxp",
        "j": "lkvqpsmu",
        "I_m": "wpdkslqe",
        "m": "ydfvhqeo",
        "\\theta": "fkjdiqru",
        "\\epsilon_k": "plmbrrxo",
        "a_0": "vzhqmext",
        "b_j": "rplwzjcy",
        "c_k": "xkchdvge",
        "p": "qnrhtsao"
      },
      "question": "Let $wpdkslqe = \\int_0^{2\\pi} \\cos(qzxwvtnp)\\cos(2qzxwvtnp)\\cdots \\cos(ydfvhqeo qzxwvtnp)\\,dqzxwvtnp$. For\nwhich integers $ydfvhqeo$, $1 \\leq ydfvhqeo \\leq 10$ is $wpdkslqe \\neq 0$?",
      "solution": "Solution. By de Moivre's Theorem \\( \\left(\\cos fkjdiqru+i \\sin fkjdiqru=e^{i fkjdiqru}\\right. \\), [Spv, Ch. 24]), we have\n\\[\nwpdkslqe=\\int_{0}^{2 \\pi} \\prod_{hjgrksla=1}^{ydfvhqeo}\\left(\\frac{e^{i \\, hjgrksla \\, qzxwvtnp}+e^{-i \\, hjgrksla \\, qzxwvtnp}}{2}\\right) d qzxwvtnp=2^{-ydfvhqeo} \\sum_{plmbrrxo_{hjgrksla}= \\pm 1} \\int_{0}^{2 \\pi} e^{i\\left(plmbrrxo_{1}+2 plmbrrxo_{2}+\\cdots+ydfvhqeo \\, plmbrrxo_{ydfvhqeo}\\right) qzxwvtnp} d qzxwvtnp\n\\]\nwhere the sum ranges over the \\( 2^{ydfvhqeo} ydfvhqeo \\)-tuples \\( \\left(plmbrrxo_{1}, \\ldots, plmbrrxo_{ydfvhqeo}\\right) \\) with \\( plmbrrxo_{hjgrksla}= \\pm 1 \\) for each \\( hjgrksla \\). For integers \\( mzdnfrxp \\),\n\\[\n\\int_{0}^{2 \\pi} e^{i \\, mzdnfrxp \\, qzxwvtnp} d qzxwvtnp=\\left\\{\\begin{array}{l}\n2 \\pi, \\text { if } mzdnfrxp=0 \\\\\n0, \\text { otherwise }\n\\end{array}\\right.\n\\]\n\nThus \\( wpdkslqe \\neq 0 \\) if and only 0 can be written as\n\\[\nplmbrrxo_{1}+2 plmbrrxo_{2}+\\cdots+ydfvhqeo \\, plmbrrxo_{ydfvhqeo}\n\\]\nfor some \\( plmbrrxo_{1}, \\ldots, plmbrrxo_{ydfvhqeo} \\in\\{1,-1\\} \\). If such \\( plmbrrxo_{hjgrksla} \\) exist, then\n\\[\n0=plmbrrxo_{1}+2 plmbrrxo_{2}+\\cdots+ydfvhqeo \\, plmbrrxo_{ydfvhqeo} \\equiv 1+2+\\cdots+ydfvhqeo=\\frac{ydfvhqeo(ydfvhqeo+1)}{2} \\quad(\\bmod 2)\n\\]\nso \\( ydfvhqeo(ydfvhqeo+1) \\equiv 0(\\bmod 4) \\), which forces \\( ydfvhqeo \\equiv 0 \\) or \\( 3(\\bmod 4) \\). Conversely, if \\( ydfvhqeo \\equiv 0 \\) \\( (\\bmod 4) \\), then\n\\[\n0=(1-2-3+4)+(5-6-7+8)+\\cdots+((ydfvhqeo-3)-(ydfvhqeo-2)-(ydfvhqeo-1)+ydfvhqeo),\n\\]\nand if \\( ydfvhqeo \\equiv 3(\\bmod 4) \\),\n\\[\n0=(1+2-3)+(4-5-6+7)+(8-9-10+11)+((ydfvhqeo-3)-(ydfvhqeo-2)-(ydfvhqeo-1)+ydfvhqeo) .\n\\]\n\nThus \\( wpdkslqe \\neq 0 \\) if and only \\( ydfvhqeo \\equiv 0 \\) or \\( 3(\\bmod 4) \\). The integers \\( ydfvhqeo \\) between 1 and 10 satisfying this condition are \\( 3,4,7,8 \\).\n\nReinterpretation. This is a question in Fourier analysis. The function\n\\[\n\\cos (qzxwvtnp) \\cos (2 qzxwvtnp) \\cdots \\cos (ydfvhqeo \\, qzxwvtnp)\n\\]\nis continuous and periodic with period \\( 2 \\pi \\), so it can be written as a Fourier series\n\\[\n\\cos (qzxwvtnp) \\cos (2 qzxwvtnp) \\cdots \\cos (ydfvhqeo \\, qzxwvtnp)=vzhqmext+\\sum_{lkvqpsmu=1}^{\\infty} rplwzjcy \\cos (lkvqpsmu \\, qzxwvtnp)+\\sum_{hjgrksla=1}^{\\infty} xkchdvge \\sin (hjgrksla \\, qzxwvtnp) .\n\\]\n\nThe question asks: For which integers \\( ydfvhqeo \\) between 1 and 10 is \\( vzhqmext \\) nonzero? By similar methods, one can show that:\n(i) \\( xkchdvge=0 \\) for all \\( hjgrksla \\), and\n(ii) \\( rplwzjcy=qnrhtsao / 2^{ydfvhqeo-1} \\), where \\( qnrhtsao \\) is the number of ways to express \\( lkvqpsmu \\) as \\( plmbrrxo_{1}+2 plmbrrxo_{2}+\\cdots+ydfvhqeo \\, plmbrrxo_{ydfvhqeo} \\), where \\( plmbrrxo_{1}, \\ldots, plmbrrxo_{ydfvhqeo} \\in\\{1,-1\\} \\).\nIn particular, only finitely many \\( rplwzjcy \\) are nonzero, and \\( vzhqmext+\\sum_{lkvqpsmu} rplwzjcy=1 \\).\n"
    },
    "kernel_variant": {
      "question": "For a positive integer m define  \n\n  Kₘ = ∬_{0}^{2π}  ∏_{k=1}^{m} cos(k(x+y)) cos(k(x−y)) dx dy.   (1)\n\nDetermine all integers m with 1 ≤ m ≤ 25 for which Kₘ ≠ 0.\n\n────────────────────────────────────────────────────────────────────────────",
      "solution": "Step 1.  Rewrite each cosine with complex exponentials  \n cos θ = ( e^{iθ}+e^{−iθ} )/2.  \nFor a fixed k\n\n cos(k(x+y)) cos(k(x−y))\n = ¼( e^{ik(x+y)}+e^{−ik(x+y)} )( e^{ik(x−y)}+e^{−ik(x−y)} )\n = ¼ ∑_{ε,δ = ±1} e^{ik[(ε+δ)x+(ε−δ)y]}.                           (2)\n\nStep 2.  Expand the whole product.  \nPut ε_k, δ_k ∈ {±1}.  From (2)  \n\n ∏_{k=1}^{m} cos(k(x+y)) cos(k(x−y))\n = 4^{−m} ∑_{(ε,δ)} exp i [ (∑_{k}k(ε_k+δ_k))x + (∑_{k}k(ε_k−δ_k))y ].   (3)\n\nStep 3.  Integrate over the 2-torus.  \nBecause  \n\n ∫_{0}^{2π}e^{iAx}dx = 2π if A=0 and 0 otherwise,\n\nwe obtain  \n\n Kₘ = (2π)²·4^{−m}·Nₘ,                                             (4)\n\nwhere Nₘ is the number of sign-choices (ε_k,δ_k) for which the two simultaneous equations  \n\n Σ_{k=1}^{m} k(ε_k+δ_k)=0,\n Σ_{k=1}^{m} k(ε_k−δ_k)=0,                                      (5)\n\nhold.\n\nThus Kₘ ≠ 0 ⇔ system (5) is solvable.\n\nStep 4.  Reformulate (5).  \nFor every k set  \n\n a_k = (ε_k+δ_k)/2, b_k = (ε_k−δ_k)/2.     (6)\n\nEach a_k, b_k ∈ {−1,0,1}, and exactly one of them is non–zero (because ε_k,δ_k can’t be equal and opposite simultaneously).  Equation (5) becomes  \n\n Σ_{k=1}^{m} k a_k = 0,                                               (7a)\n Σ_{k=1}^{m} k b_k = 0,                                               (7b)\n |a_k|+|b_k| = 1 for every k.                                        (7c)\n\nInterpretation:  Split {1,…,m} into four groups  \n\n X₊ = {k : a_k = 1}, X₋ = {k : a_k = −1},  \n Y₊ = {k : b_k = 1}, Y₋ = {k : b_k = −1},        (8)\n\nwith each integer belonging to exactly one group, such that  \n\n Σ_{X₊}k − Σ_{X₋}k = 0,  Σ_{Y₊}k − Σ_{Y₋}k = 0.            (9)\n\nStep 5.  A necessary parity condition.  \nLet O be the set of odd integers ≤ m.  From (9) we have  \n\n #(X₊∩O) ≡ #(X₋∩O) (mod 2) and #(Y₊∩O) ≡ #(Y₋∩O) (mod 2).   (10)\n\nHence the total number of odd k, namely #(O), is even:\n\n #(O) = #(X₊∩O)+#(X₋∩O)+#(Y₊∩O)+#(Y₋∩O) ≡ 0 (mod 2).        (11)\n\nBut #(O) = ⌈m/2⌉.  Therefore m cannot leave an odd number of odds, i.e.  \n\n m ≡ 1 or 2 (mod 4) ⇒ Kₘ = 0.                                    (12)\n\nStep 6.  Constructive sufficiency for m ≡ 0, 3 (mod 4).  \n(a)  Case m = 4q.  Partition {1,…,m} into q consecutive quadruples  \n (4j−3,4j−2,4j−1,4j), j=1,…,q.  \n Assign odd-indexed quadruples to X, even-indexed to Y with the pattern  \n\n X:  ( + − − + ) so (4j−3)+(4j)−(4j−2)−(4j−1)=0,  \n Y:  same pattern.                                        (13)\n\nEach subtotal is zero, so (9) holds.\n\n(b)  Case m = 4q+3.  First place {1,2,3} in X with signs (+,+,−). Then proceed exactly as in (a) with the remaining 4q numbers.  The triple 1+2−3=0 keeps X balanced; the quadruples keep both X and Y balanced.\n\nThus for every m ≡ 0 or 3 (mod 4) a solution of (7) exists, so Kₘ ≠ 0.\n\nStep 7.  Final classification.  \nCombine (12) with Step 6:\n\n Kₘ ≠ 0  iff m ≡ 0 or 3 (mod 4).                               (14)\n\nFor 1 ≤ m ≤ 25 this gives  \n\n m = 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24.                (15)\n\n────────────────────────────────────────────────────────────────────────────",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.683370",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension: the integral is over the 2-torus, so the Fourier–analysis argument now requires two simultaneous linear diophantine conditions instead of one.\n\n2. Additional constraints: each integer k must be allocated to exactly one of two separate zero-summing signed sets, introducing a coupled partition problem rather than a single one.\n\n3. Deeper theoretical requirement: parity arguments alone are insufficient; the solver must reformulate the sign choices, recognize the necessity of simultaneous cancellations, and construct explicit balanced decompositions in two coordinates.\n\n4. More steps: the solution needs (i) complex-exponential expansion, (ii) reduction to a lattice-point counting problem, (iii) parity obstructions, and (iv) an explicit constructive algorithm—considerably longer than the original single-equation treatment.\n\n5. Non-trivial generalisation: although the final congruence condition resembles the original answer, establishing it in two dimensions demands significantly more sophisticated combinatorial reasoning and careful bookkeeping, eliminating the possibility of simple pattern-matching."
      }
    },
    "original_kernel_variant": {
      "question": "For a positive integer m define  \n\n  Kₘ = ∬_{0}^{2π}  ∏_{k=1}^{m} cos(k(x+y)) cos(k(x−y)) dx dy.   (1)\n\nDetermine all integers m with 1 ≤ m ≤ 25 for which Kₘ ≠ 0.\n\n────────────────────────────────────────────────────────────────────────────",
      "solution": "Step 1.  Rewrite each cosine with complex exponentials  \n cos θ = ( e^{iθ}+e^{−iθ} )/2.  \nFor a fixed k\n\n cos(k(x+y)) cos(k(x−y))\n = ¼( e^{ik(x+y)}+e^{−ik(x+y)} )( e^{ik(x−y)}+e^{−ik(x−y)} )\n = ¼ ∑_{ε,δ = ±1} e^{ik[(ε+δ)x+(ε−δ)y]}.                           (2)\n\nStep 2.  Expand the whole product.  \nPut ε_k, δ_k ∈ {±1}.  From (2)  \n\n ∏_{k=1}^{m} cos(k(x+y)) cos(k(x−y))\n = 4^{−m} ∑_{(ε,δ)} exp i [ (∑_{k}k(ε_k+δ_k))x + (∑_{k}k(ε_k−δ_k))y ].   (3)\n\nStep 3.  Integrate over the 2-torus.  \nBecause  \n\n ∫_{0}^{2π}e^{iAx}dx = 2π if A=0 and 0 otherwise,\n\nwe obtain  \n\n Kₘ = (2π)²·4^{−m}·Nₘ,                                             (4)\n\nwhere Nₘ is the number of sign-choices (ε_k,δ_k) for which the two simultaneous equations  \n\n Σ_{k=1}^{m} k(ε_k+δ_k)=0,\n Σ_{k=1}^{m} k(ε_k−δ_k)=0,                                      (5)\n\nhold.\n\nThus Kₘ ≠ 0 ⇔ system (5) is solvable.\n\nStep 4.  Reformulate (5).  \nFor every k set  \n\n a_k = (ε_k+δ_k)/2, b_k = (ε_k−δ_k)/2.     (6)\n\nEach a_k, b_k ∈ {−1,0,1}, and exactly one of them is non–zero (because ε_k,δ_k can’t be equal and opposite simultaneously).  Equation (5) becomes  \n\n Σ_{k=1}^{m} k a_k = 0,                                               (7a)\n Σ_{k=1}^{m} k b_k = 0,                                               (7b)\n |a_k|+|b_k| = 1 for every k.                                        (7c)\n\nInterpretation:  Split {1,…,m} into four groups  \n\n X₊ = {k : a_k = 1}, X₋ = {k : a_k = −1},  \n Y₊ = {k : b_k = 1}, Y₋ = {k : b_k = −1},        (8)\n\nwith each integer belonging to exactly one group, such that  \n\n Σ_{X₊}k − Σ_{X₋}k = 0,  Σ_{Y₊}k − Σ_{Y₋}k = 0.            (9)\n\nStep 5.  A necessary parity condition.  \nLet O be the set of odd integers ≤ m.  From (9) we have  \n\n #(X₊∩O) ≡ #(X₋∩O) (mod 2) and #(Y₊∩O) ≡ #(Y₋∩O) (mod 2).   (10)\n\nHence the total number of odd k, namely #(O), is even:\n\n #(O) = #(X₊∩O)+#(X₋∩O)+#(Y₊∩O)+#(Y₋∩O) ≡ 0 (mod 2).        (11)\n\nBut #(O) = ⌈m/2⌉.  Therefore m cannot leave an odd number of odds, i.e.  \n\n m ≡ 1 or 2 (mod 4) ⇒ Kₘ = 0.                                    (12)\n\nStep 6.  Constructive sufficiency for m ≡ 0, 3 (mod 4).  \n(a)  Case m = 4q.  Partition {1,…,m} into q consecutive quadruples  \n (4j−3,4j−2,4j−1,4j), j=1,…,q.  \n Assign odd-indexed quadruples to X, even-indexed to Y with the pattern  \n\n X:  ( + − − + ) so (4j−3)+(4j)−(4j−2)−(4j−1)=0,  \n Y:  same pattern.                                        (13)\n\nEach subtotal is zero, so (9) holds.\n\n(b)  Case m = 4q+3.  First place {1,2,3} in X with signs (+,+,−). Then proceed exactly as in (a) with the remaining 4q numbers.  The triple 1+2−3=0 keeps X balanced; the quadruples keep both X and Y balanced.\n\nThus for every m ≡ 0 or 3 (mod 4) a solution of (7) exists, so Kₘ ≠ 0.\n\nStep 7.  Final classification.  \nCombine (12) with Step 6:\n\n Kₘ ≠ 0  iff m ≡ 0 or 3 (mod 4).                               (14)\n\nFor 1 ≤ m ≤ 25 this gives  \n\n m = 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24.                (15)\n\n────────────────────────────────────────────────────────────────────────────",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.535853",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension: the integral is over the 2-torus, so the Fourier–analysis argument now requires two simultaneous linear diophantine conditions instead of one.\n\n2. Additional constraints: each integer k must be allocated to exactly one of two separate zero-summing signed sets, introducing a coupled partition problem rather than a single one.\n\n3. Deeper theoretical requirement: parity arguments alone are insufficient; the solver must reformulate the sign choices, recognize the necessity of simultaneous cancellations, and construct explicit balanced decompositions in two coordinates.\n\n4. More steps: the solution needs (i) complex-exponential expansion, (ii) reduction to a lattice-point counting problem, (iii) parity obstructions, and (iv) an explicit constructive algorithm—considerably longer than the original single-equation treatment.\n\n5. Non-trivial generalisation: although the final congruence condition resembles the original answer, establishing it in two dimensions demands significantly more sophisticated combinatorial reasoning and careful bookkeeping, eliminating the possibility of simple pattern-matching."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation",
  "iteratively_fixed": true
}