{
  "index": "1956-A-7",
  "type": "COMB",
  "tag": [
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "7. Prove that the number of odd binomial coefficients in any finite binomial expansion is a power of 2 .",
  "solution": "Solution. First we note that \\( (1+x)^{2} \\equiv 1+x^{2}(\\bmod 2) \\) and hence, by induction \\( (1+x)^{\\beta} \\equiv 1+x^{\\beta}(\\bmod 2) \\) if \\( \\beta \\) is any power of 2 .\n\nLet the exponent of the binomial be \\( n \\), a positive integer, and represent \\( n \\) in the form\n\\[\nn=2^{\\alpha_{1}}+2^{\\alpha_{2}}+\\cdots+2^{\\alpha_{s}}\n\\]\nwhere the \\( \\alpha \\) 's are integers and \\( 0 \\leq \\alpha_{1}<\\alpha_{2}<\\cdots<\\alpha_{s} \\). [Note that in effect this is the dyadic expansion of \\( n \\).] For convenience let \\( \\beta_{i}=2^{\\alpha_{i}} \\). Then we write the finite binomial expansion in the form\n\\[\n\\begin{aligned}\n(1+x)^{\\prime \\prime} & =(1+x)^{\\beta_{1}}(1+x)^{\\beta_{2}} \\cdots(1+x)^{\\beta_{s}} \\\\\n& \\equiv\\left(1+x^{\\beta_{1}}\\right)\\left(1+x^{\\beta_{2}}\\right) \\cdots\\left(1+x^{\\beta_{s}}\\right)(\\bmod 2) .\n\\end{aligned}\n\\]\n\nWhen the latter expression is multiplied out, there are clearly \\( 2^{s} \\) terms, each involving a different power of \\( x \\) because each non-negative integer has exactly one representation as a sum (possibly empty) of distinct powers of 2. Hence exactly \\( 2^{s} \\) terms of \\( (1+x)^{n} \\) have odd integers as coefficients, that is, exactly \\( 2^{s} \\) of the binomial coefficients \\( \\binom{\\prime \\prime}{\\prime}, i=0,1, \\ldots, n \\), are odd. The proof shows that \\( s \\) is the number of unit digits which appear in the dyadic expansion of \\( n \\). The result is also valid for \\( \\boldsymbol{n}=0 \\).\n\nRemarks. This problem appeared as Problem E 1288, American Mathematical Monthly, vol. 65 (1958), pages 368-369. A generalization appeared as Problem 4723, American Mathematical Monthly, vol. 65 (1958), page 48: \"Given a non-negative integer \\( n \\) and a prime \\( p \\), obtain an expression for the number of binomial coefficients \\( \\binom{n}{r} \\) which are not divisible by \\( p \\).\" If \\( n \\) is written in the base \\( p \\), let \\( \\left\\{n_{i}\\right\\} \\) be the \"digits\" which appear. Then the required number of binomial coefficients not divisible by \\( p \\) is given by \\( \\Pi\\left(n_{i}+1\\right) \\).\n\nThe same process used to establish the original result can be used to prove the following: Suppose \\( p \\) is a prime and \\( n \\) and \\( k \\) are integers, \\( 0 \\leq k \\leq n \\). Let\n\\[\n\\begin{array}{l}\nn=n_{0}+n_{1} p+n_{2} p^{2}+\\cdots+n_{t} p^{\\prime} \\\\\nk=k_{0}+k_{1} p+k_{2} p^{2}+\\cdots+k_{t} p^{\\prime}\n\\end{array}\n\\]\nbe the \\( p \\)-adic expansions of \\( n \\) and \\( k \\). Then\n\\[\n\\binom{n}{k} \\equiv\\binom{n_{0}}{k_{0}}\\binom{n_{1}}{k_{1}}\\binom{n_{2}}{k_{2}} \\cdots\\binom{n_{1}}{k_{1}}(\\bmod p) .\n\\]",
  "vars": [
    "x",
    "r",
    "i",
    "k"
  ],
  "params": [
    "n",
    "p",
    "s",
    "t",
    "n_i",
    "n_0",
    "n_1",
    "n_2",
    "n_t",
    "k_i",
    "k_0",
    "k_1",
    "k_2",
    "k_t",
    "\\\\alpha",
    "\\\\alpha_1",
    "\\\\alpha_2",
    "\\\\alpha_s",
    "\\\\beta",
    "\\\\beta_i",
    "\\\\beta_1",
    "\\\\beta_2",
    "\\\\beta_s"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "variablex",
        "r": "combindex",
        "i": "iterindex",
        "k": "chooseindex",
        "n": "expovalue",
        "p": "primebase",
        "s": "digitcount",
        "t": "maxpower",
        "n_i": "expodigit",
        "n_0": "expodigitzero",
        "n_1": "expodigitone",
        "n_2": "expodigittwo",
        "n_t": "expodigittop",
        "k_i": "choosepart",
        "k_0": "choosepartzero",
        "k_1": "choosepartone",
        "k_2": "chooseparttwo",
        "k_t": "chooseparttop",
        "\\alpha": "alphapower",
        "\\alpha_1": "alphapowerone",
        "\\alpha_2": "alphapowertwo",
        "\\alpha_s": "alphapowermax",
        "\\beta": "betapower",
        "\\beta_i": "betapart",
        "\\beta_1": "betapartone",
        "\\beta_2": "betaparttwo",
        "\\beta_s": "betapartmax"
      },
      "question": "7. Prove that the number of odd binomial coefficients in any finite binomial expansion is a power of 2 .",
      "solution": "Solution. First we note that \\( (1+variablex)^{2} \\equiv 1+variablex^{2}(\\bmod 2) \\) and hence, by induction \\( (1+variablex)^{betapower} \\equiv 1+variablex^{betapower}(\\bmod 2) \\) if \\( betapower \\) is any power of 2 .\n\nLet the exponent of the binomial be \\( expovalue \\), a positive integer, and represent \\( expovalue \\) in the form\n\\[\nexpovalue=2^{alphapowerone}+2^{alphapowertwo}+\\cdots+2^{alphapowermax}\n\\]\nwhere the \\( alphapower \\) 's are integers and \\( 0 \\leq alphapowerone<alphapowertwo<\\cdots<alphapowermax \\). [Note that in effect this is the dyadic expansion of \\( expovalue \\).] For convenience let \\( betapart=2^{\\alpha_{i}} \\). Then we write the finite binomial expansion in the form\n\\[\n\\begin{aligned}\n(1+variablex)^{\\prime \\prime} & =(1+variablex)^{betapartone}(1+variablex)^{betaparttwo} \\cdots(1+variablex)^{betapartmax} \\\\\n& \\equiv\\left(1+variablex^{betapartone}\\right)\\left(1+variablex^{betaparttwo}\\right) \\cdots\\left(1+variablex^{betapartmax}\\right)(\\bmod 2) .\n\\end{aligned}\n\\]\n\nWhen the latter expression is multiplied out, there are clearly \\( 2^{digitcount} \\) terms, each involving a different power of \\( variablex \\) because each non-negative integer has exactly one representation as a sum (possibly empty) of distinct powers of 2. Hence exactly \\( 2^{digitcount} \\) terms of \\( (1+variablex)^{expovalue} \\) have odd integers as coefficients, that is, exactly \\( 2^{digitcount} \\) of the binomial coefficients \\( \\binom{\\prime \\prime}{\\prime}, iterindex=0,1, \\ldots, expovalue \\), are odd. The proof shows that \\( digitcount \\) is the number of unit digits which appear in the dyadic expansion of \\( expovalue \\). The result is also valid for \\( \\boldsymbol{expovalue}=0 \\).\n\nRemarks. This problem appeared as Problem E 1288, American Mathematical Monthly, vol. 65 (1958), pages 368-369. A generalization appeared as Problem 4723, American Mathematical Monthly, vol. 65 (1958), page 48: \"Given a non-negative integer \\( expovalue \\) and a prime \\( primebase \\), obtain an expression for the number of binomial coefficients \\( \\binom{expovalue}{combindex} \\) which are not divisible by \\( primebase \\).\" If \\( expovalue \\) is written in the base \\( primebase \\), let \\( \\left\\{expodigit\\right\\} \\) be the \"digits\" which appear. Then the required number of binomial coefficients not divisible by \\( primebase \\) is given by \\( \\Pi\\left(expodigit+1\\right) \\).\n\nThe same process used to establish the original result can be used to prove the following: Suppose \\( primebase \\) is a prime and \\( expovalue \\) and \\( chooseindex \\) are integers, \\( 0 \\leq chooseindex \\leq expovalue \\). Let\n\\[\n\\begin{array}{l}\nexpovalue=expodigitzero+expodigitone\\, primebase+expodigittwo\\, primebase^{2}+\\cdots+expodigittop\\, primebase^{\\prime} \\\\\nchooseindex=choosepartzero+choosepartone\\, primebase+chooseparttwo\\, primebase^{2}+\\cdots+chooseparttop\\, primebase^{\\prime}\n\\end{array}\n\\]\nbe the \\( primebase \\)-adic expansions of \\( expovalue \\) and \\( chooseindex \\). Then\n\\[\n\\binom{expovalue}{chooseindex} \\equiv\\binom{expodigitzero}{choosepartzero}\\binom{expodigitone}{choosepartone}\\binom{expodigittwo}{chooseparttwo} \\cdots\\binom{expodigitone}{choosepartone}(\\bmod primebase) .\n\\]"
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "hummingbird",
        "r": "tangerine",
        "i": "butternut",
        "k": "parchment",
        "n": "semaphore",
        "p": "blacksmith",
        "s": "drumstick",
        "t": "lighthouse",
        "n_i": "delicacy",
        "n_0": "snowflake",
        "n_1": "buttercup",
        "n_2": "scarecrow",
        "n_t": "afterglow",
        "k_i": "gentleman",
        "k_0": "arrowhead",
        "k_1": "steamboat",
        "k_2": "workbench",
        "k_t": "toothpick",
        "\\alpha": "scholarship",
        "\\alpha_1": "scholarone",
        "\\alpha_2": "scholartwo",
        "\\alpha_s": "scholartist",
        "\\beta": "strawflower",
        "\\beta_i": "starfish",
        "\\beta_1": "starfruit",
        "\\beta_2": "startpoint",
        "\\beta_s": "starlitsky"
      },
      "question": "7. Prove that the number of odd binomial coefficients in any finite binomial expansion is a power of 2 .",
      "solution": "Solution. First we note that \\( (1+hummingbird)^{2} \\equiv 1+hummingbird^{2}(\\bmod 2) \\) and hence, by induction \\( (1+hummingbird)^{strawflower} \\equiv 1+hummingbird^{strawflower}(\\bmod 2) \\) if \\( strawflower \\) is any power of 2 .\n\nLet the exponent of the binomial be \\( semaphore \\), a positive integer, and represent \\( semaphore \\) in the form\n\\[\nsemaphore=2^{scholarone}+2^{scholartwo}+\\cdots+2^{scholartist}\n\\]\nwhere the \\( scholarship \\) 's are integers and \\( 0 \\leq scholarone<scholartwo<\\cdots<scholartist \\). [Note that in effect this is the dyadic expansion of \\( semaphore \\).] For convenience let \\( starfish=2^{\\alpha_{i}} \\). Then we write the finite binomial expansion in the form\n\\[\n\\begin{aligned}\n(1+hummingbird)^{\\prime \\prime} & =(1+hummingbird)^{starfruit}(1+hummingbird)^{startpoint} \\cdots(1+hummingbird)^{starlitsky} \\\\\n& \\equiv\\left(1+hummingbird^{starfruit}\\right)\\left(1+hummingbird^{startpoint}\\right) \\cdots\\left(1+hummingbird^{starlitsky}\\right)(\\bmod 2) .\n\\end{aligned}\n\\]\n\nWhen the latter expression is multiplied out, there are clearly \\( 2^{drumstick} \\) terms, each involving a different power of hummingbird because each non-negative integer has exactly one representation as a sum (possibly empty) of distinct powers of 2. Hence exactly \\( 2^{drumstick} \\) terms of \\( (1+hummingbird)^{semaphore} \\) have odd integers as coefficients, that is, exactly \\( 2^{drumstick} \\) of the binomial coefficients \\( \\binom{\\prime \\prime}{\\prime}, butternut=0,1, \\ldots, semaphore \\), are odd. The proof shows that \\( drumstick \\) is the number of unit digits which appear in the dyadic expansion of \\( semaphore \\). The result is also valid for \\( \\boldsymbol{semaphore}=0 \\).\n\nRemarks. This problem appeared as Problem E 1288, American Mathematical Monthly, vol. 65 (1958), pages 368-369. A generalization appeared as Problem 4723, American Mathematical Monthly, vol. 65 (1958), page 48: \"Given a non-negative integer \\( semaphore \\) and a prime \\( blacksmith \\), obtain an expression for the number of binomial coefficients \\( \\binom{semaphore}{tangerine} \\) which are not divisible by \\( blacksmith \\).\" If \\( semaphore \\) is written in the base \\( blacksmith \\), let \\( \\{delicacy\\} \\) be the \"digits\" which appear. Then the required number of binomial coefficients not divisible by \\( blacksmith \\) is given by \\( \\Pi(delicacy+1) \\).\n\nThe same process used to establish the original result can be used to prove the following: Suppose \\( blacksmith \\) is a prime and \\( semaphore \\) and \\( parchment \\) are integers, \\( 0 \\leq parchment \\leq semaphore \\). Let\n\\[\n\\begin{array}{l}\nsemaphore=snowflake+buttercup\\, blacksmith+scarecrow\\, blacksmith^{2}+\\cdots+afterglow\\, blacksmith^{\\prime} \\\\\nparchment=arrowhead+steamboat\\, blacksmith+workbench\\, blacksmith^{2}+\\cdots+toothpick\\, blacksmith^{\\prime}\n\\end{array}\n\\]\nbe the \\( blacksmith \\)-adic expansions of \\( semaphore \\) and \\( parchment \\). Then\n\\[\n\\binom{semaphore}{parchment} \\equiv\\binom{snowflake}{arrowhead}\\binom{buttercup}{steamboat}\\binom{scarecrow}{workbench} \\cdots\\binom{buttercup}{steamboat}(\\bmod blacksmith) .\n\\]"
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "constant",
        "r": "unchchanged",
        "i": "aggregate",
        "k": "steadiness",
        "n": "fraction",
        "p": "composite",
        "s": "singular",
        "t": "beginning",
        "n_i": "blankspace",
        "n_0": "alphabeticzero",
        "n_1": "alphabeticone",
        "n_2": "alphabetictwo",
        "n_t": "alphabeticterminal",
        "k_i": "rejectdigit",
        "k_0": "rejectzero",
        "k_1": "rejectone",
        "k_2": "rejecttwo",
        "k_t": "rejectterminal",
        "\\alpha": "omegavar",
        "\\alpha_1": "omegavarone",
        "\\alpha_2": "omegavartwo",
        "\\alpha_s": "omegavarterminal",
        "\\beta": "deltavar",
        "\\beta_i": "deltavardigit",
        "\\beta_1": "deltavarone",
        "\\beta_2": "deltavartwo",
        "\\beta_s": "deltavarterminal"
      },
      "question": "7. Prove that the number of odd binomial coefficients in any finite binomial expansion is a power of 2 .",
      "solution": "Solution. First we note that \\( (1+\\constant)^{2} \\equiv 1+\\constant^{2}(\\bmod 2) \\) and hence, by induction \\( (1+\\constant)^{\\deltavar} \\equiv 1+\\constant^{\\deltavar}(\\bmod 2) \\) if \\( \\deltavar \\) is any power of 2 .\n\nLet the exponent of the binomial be \\( \\fraction \\), a positive integer, and represent \\( \\fraction \\) in the form\n\\[\n\\fraction=2^{\\omegavarone}+2^{\\omegavartwo}+\\cdots+2^{\\omegavarterminal}\n\\]\nwhere the \\( \\omegavar \\) 's are integers and \\( 0 \\leq \\omegavarone<\\omegavartwo<\\cdots<\\omegavarterminal \\). [Note that in effect this is the dyadic expansion of \\( \\fraction \\).] For convenience let \\( \\deltavardigit=2^{\\alpha_{i}} \\). Then we write the finite binomial expansion in the form\n\\[\n\\begin{aligned}\n(1+\\constant)^{\\prime \\prime} & =(1+\\constant)^{\\deltavarone}(1+\\constant)^{\\deltavartwo} \\cdots(1+\\constant)^{\\deltavarterminal} \\\\\n& \\equiv\\left(1+\\constant^{\\deltavarone}\\right)\\left(1+\\constant^{\\deltavartwo}\\right) \\cdots\\left(1+\\constant^{\\deltavarterminal}\\right)(\\bmod 2) .\n\\end{aligned}\n\\]\n\nWhen the latter expression is multiplied out, there are clearly \\( 2^{\\singular} \\) terms, each involving a different power of \\( \\constant \\) because each non-negative integer has exactly one representation as a sum (possibly empty) of distinct powers of 2. Hence exactly \\( 2^{\\singular} \\) terms of \\( (1+\\constant)^{\\fraction} \\) have odd integers as coefficients, that is, exactly \\( 2^{\\singular} \\) of the binomial coefficients \\( \\binom{\\prime \\prime}{\\prime}, \\aggregate=0,1, \\ldots, \\fraction \\), are odd. The proof shows that \\( \\singular \\) is the number of unit digits which appear in the dyadic expansion of \\( \\fraction \\). The result is also valid for \\( \\boldsymbol{\\fraction}=0 \\).\n\nRemarks. This problem appeared as Problem E 1288, American Mathematical Monthly, vol. 65 (1958), pages 368-369. A generalization appeared as Problem 4723, American Mathematical Monthly, vol. 65 (1958), page 48: \"Given a non-negative integer \\( \\fraction \\) and a prime \\( \\composite \\), obtain an expression for the number of binomial coefficients \\( \\binom{\\fraction}{\\unchanged} \\) which are not divisible by \\( \\composite \\).\" If \\( \\fraction \\) is written in the base \\( \\composite \\), let \\( \\left\\{\\blankspace\\right\\} \\) be the \"digits\" which appear. Then the required number of binomial coefficients not divisible by \\( \\composite \\) is given by \\( \\Pi\\left(\\blankspace+1\\right) \\).\n\nThe same process used to establish the original result can be used to prove the following: Suppose \\( \\composite \\) is a prime and \\( \\fraction \\) and \\( \\steadiness \\) are integers, \\( 0 \\leq \\steadiness \\leq \\fraction \\). Let\n\\[\n\\begin{array}{l}\n\\fraction=\\alphabeticzero+\\alphabeticone \\composite+\\alphabetictwo \\composite^{2}+\\cdots+\\alphabeticterminal \\composite^{\\prime} \\\\\n\\steadiness=\\rejectzero+\\rejectone \\composite+\\rejecttwo \\composite^{2}+\\cdots+\\rejectterminal \\composite^{\\prime}\n\\end{array}\n\\]\nbe the \\( \\composite \\)-adic expansions of \\( \\fraction \\) and \\( \\steadiness \\). Then\n\\[\n\\binom{\\fraction}{\\steadiness} \\equiv\\binom{\\alphabeticzero}{\\rejectzero}\\binom{\\alphabeticone}{\\rejectone}\\binom{\\alphabetictwo}{\\rejecttwo} \\cdots\\binom{\\alphabeticone}{\\rejectone}(\\bmod \\composite) .\n\\]"
    },
    "garbled_string": {
      "map": {
        "x": "azpofgri",
        "r": "qlmnevjs",
        "i": "hzdwykpt",
        "k": "ufbsahmq",
        "n": "tsxcvelq",
        "p": "krdozywa",
        "s": "yqhrmlcf",
        "t": "gknejrsv",
        "n_i": "lpwazmke",
        "n_0": "ibxvlqsa",
        "n_1": "dkrsypjg",
        "n_2": "omczfnti",
        "n_t": "vxejkbhg",
        "k_i": "ftdwoqzs",
        "k_0": "gmyrplbd",
        "k_1": "qprsfhzd",
        "k_2": "wxvclnge",
        "k_t": "cvsujodp",
        "\\alpha": "odchafrn",
        "\\alpha_1": "xqirejms",
        "\\alpha_2": "hzvkanod",
        "\\alpha_s": "nmajdylg",
        "\\beta": "pigwjxro",
        "\\beta_i": "yozsknfc",
        "\\beta_1": "ruevadpq",
        "\\beta_2": "wjrtcfam",
        "\\beta_s": "bkgqpzse"
      },
      "question": "7. Prove that the number of odd binomial coefficients in any finite binomial expansion is a power of 2 .",
      "solution": "Solution. First we note that \\( (1+azpofgri)^{2} \\equiv 1+azpofgri^{2}(\\bmod 2) \\) and hence, by induction \\( (1+azpofgri)^{pigwjxro} \\equiv 1+azpofgri^{pigwjxro}(\\bmod 2) \\) if \\( pigwjxro \\) is any power of 2.\n\nLet the exponent of the binomial be \\( tsxcvelq \\), a positive integer, and represent \\( tsxcvelq \\) in the form\n\\[\ntsxcvelq=2^{xqirejms}+2^{hzvkanod}+\\cdots+2^{nmajdylg}\n\\]\nwhere the \\( odchafrn \\) 's are integers and \\( 0 \\leq xqirejms<hzvkanod<\\cdots<nmajdylg \\). [Note that in effect this is the dyadic expansion of \\( tsxcvelq \\).] For convenience let \\( yozsknfc=2^{\\alpha_{i}} \\). Then we write the finite binomial expansion in the form\n\\[\n\\begin{aligned}\n(1+azpofgri)^{\\prime \\prime} & =(1+azpofgri)^{ruevadpq}(1+azpofgri)^{wjrtcfam} \\cdots(1+azpofgri)^{bkgqpzse} \\\\\n& \\equiv\\left(1+azpofgri^{ruevadpq}\\right)\\left(1+azpofgri^{wjrtcfam}\\right) \\cdots\\left(1+azpofgri^{bkgqpzse}\\right)(\\bmod 2) .\n\\end{aligned}\n\\]\n\nWhen the latter expression is multiplied out, there are clearly \\( 2^{yqhrmlcf} \\) terms, each involving a different power of \\( azpofgri \\) because each non-negative integer has exactly one representation as a sum (possibly empty) of distinct powers of 2. Hence exactly \\( 2^{yqhrmlcf} \\) terms of \\( (1+azpofgri)^{tsxcvelq} \\) have odd integers as coefficients, that is, exactly \\( 2^{yqhrmlcf} \\) of the binomial coefficients \\( \\binom{\\prime \\prime}{\\prime}, hzdwykpt=0,1, \\ldots, tsxcvelq \\), are odd. The proof shows that \\( yqhrmlcf \\) is the number of unit digits which appear in the dyadic expansion of \\( tsxcvelq \\). The result is also valid for \\( \\boldsymbol{tsxcvelq}=0 \\).\n\nRemarks. This problem appeared as Problem E 1288, American Mathematical Monthly, vol. 65 (1958), pages 368-369. A generalization appeared as Problem 4723, American Mathematical Monthly, vol. 65 (1958), page 48: \"Given a non-negative integer \\( tsxcvelq \\) and a prime \\( krdozywa \\), obtain an expression for the number of binomial coefficients \\( \\binom{tsxcvelq}{qlmnevjs} \\) which are not divisible by \\( krdozywa \\).\" If \\( tsxcvelq \\) is written in the base \\( krdozywa \\), let \\( \\{lpwazmke\\} \\) be the \"digits\" which appear. Then the required number of binomial coefficients not divisible by \\( krdozywa \\) is given by \\( \\Pi(lpwazmke+1) \\).\n\nThe same process used to establish the original result can be used to prove the following: Suppose \\( krdozywa \\) is a prime and \\( tsxcvelq \\) and \\( ufbsahmq \\) are integers, \\( 0 \\leq ufbsahmq \\leq tsxcvelq \\). Let\n\\[\n\\begin{array}{l}\ntsxcvelq=ibxvlqsa+dkrsypjg\\, krdozywa+omczfnti\\, krdozywa^{2}+\\cdots+vxejkbhg\\, krdozywa^{\\prime} \\\\\nufbsahmq=gmyrplbd+qprsfhzd\\, krdozywa+wxvclnge\\, krdozywa^{2}+\\cdots+cvsujodp\\, krdozywa^{\\prime}\n\\end{array}\n\\]\nbe the \\( krdozywa \\)-adic expansions of \\( tsxcvelq \\) and \\( ufbsahmq \\). Then\n\\[\n\\binom{tsxcvelq}{ufbsahmq} \\equiv \\binom{ibxvlqsa}{gmyrplbd}\\binom{dkrsypjg}{qprsfhzd}\\binom{omczfnti}{wxvclnge} \\cdots \\binom{dkrsypjg}{qprsfhzd}(\\bmod krdozywa) .\n\\]"
    },
    "kernel_variant": {
      "question": "Let p be a prime and let d ≥ 2 be a fixed integer.  \nFor every non-negative integer n write its p–adic expansion  \n\n  n = n₀ + n₁p + n₂p² + … + n_tpᵗ  (0 ≤ n_i ≤ p–1).  \n\nConsider the multinomial expansion  \n\n  (x₁ + x₂ + … + x_d)ⁿ =  Σ_{k₁+…+k_d = n}  M(k₁,…,k_d)·x₁^{k₁}…x_d^{k_d},  \n\nwhere the multinomial coefficient is  \n\n  M(k₁,…,k_d) = n! /(k₁!…k_d!).  \n\n(a) Prove that the exact number of multinomial coefficients M(k₁,…,k_d) that are NOT divisible by p equals  \n\n  N_{p,d}(n) =  ∏_{i=0}^{t}  C(n_i + d − 1 , d − 1).   (★)\n\n(b) Describe bijectively the set of d–tuples (k₁,…,k_d) that contribute to N_{p,d}(n) in terms of the p–adic digits of the k_j ’s and of n.\n\n(c) Specialise to d = 3 and p = 2.  \n(i) Show that the number of odd trinomial coefficients in (x + y + z)ⁿ equals 3^{s₁(n)}, where s₁(n) is the number of 1–digits in the binary expansion of n.  \n(ii) Deduce that there is no non–negative integer n for which every trinomial coefficient in the expansion of (x + y + z)ⁿ is even.",
      "solution": "Throughout v_p(·) denotes the p–adic valuation.  We shall use the following d-dimensional version of Lucas’ theorem.\n\nLemma 1 (Multinomial Lucas).  \nLet  \n\n  n = ∑_{i=0}^{t} n_i p^i,    \n  k_j = ∑_{i=0}^{t} k_{j,i} p^i  (0 ≤ k_{j,i} ≤ p−1, 1 ≤ j ≤ d).\n\nDefine, for every digit i,  \n\n  M_i(k_{1,i},…,k_{d,i}) :=  \n  ⎧ C(n_i ; k_{1,i},…,k_{d,i}) = n_i!/(k_{1,i}!…k_{d,i}!),  if ∑_{j=1}^{d} k_{j,i} = n_i,  \n  ⎨  \n  ⎩ 0, otherwise.  \n\nThen  \n\n  M(k₁,…,k_d) ≡  ∏_{i=0}^{t}  M_i(k_{1,i},…,k_{d,i})  (mod p).     (1)\n\nProof.  The classical proof of Lucas’ congruence for multinomial coefficients expands n! and every k_j! in base-p blocks of size p^i – p^{i−1}.  After cancelling equal factors one is left, modulo p, with a product of ordinary multinomial numbers coming from each digit.  Whenever the digit–wise sums disagree with n_i, at least one factor is a multinomial with upper index n_i but total lower index > n_i; that multinomial is declared 0 and kills the entire product. ∎\n\nBecause every factorial below p is a unit in ℤ_p, each non–zero M_i is automatically coprime to p.  Therefore  \n\n  p ∤ M(k₁,…,k_d)   ⇔  M_i(k_{1,i},…,k_{d,i}) ≠ 0 for every i.     (2)\n\nEquivalently, no p-adic carry is allowed when the d digit vectors (k_{1,i},…,k_{d,i}) are added.\n\nPart (a).  Fix a digit position i.  To satisfy (2) one must choose\n\n  (k_{1,i},…,k_{d,i}) ∈ {0,…,p−1}^d with ∑_{j=1}^d k_{j,i} = n_i.     (3)\n\nBecause n_i ≤ p−1, every such choice automatically forbids carries inside the digit.  The number of admissible d-tuples in (3) is the standard stars-and-bars count\n\n  C(n_i + d − 1 , d − 1).     (4)\n\nDigit positions are independent once carries are excluded; hence the total number of global d-tuples (k₁,…,k_d) satisfying p ∤ M(k₁,…,k_d) is the product of (4) over i = 0,…,t, proving (★).\n\nPart (b).  A concrete bijection.  \nLet  \n\n  S = { (k₁,…,k_d) ∈ ℕ^d | ∑_{j=1}^d k_j = n and p ∤ M(k₁,…,k_d) }.  \nFor i = 0,…,t put  \n\n  C_i = { (a₁,…,a_d) ∈ {0,…,p−1}^d | ∑_{j=1}^{d} a_j = n_i }.  \n\nDefine  \n\n  Φ : S → C_0 × … × C_t,  (k₁,…,k_d) ↦ ((k_{1,0},…,k_{d,0}),…, (k_{1,t},…,k_{d,t})).  \n\nSurjectivity.  Any choice of vectors in C_0×…×C_t specifies unique digits k_{j,i}; assembling them gives k_j = ∑_{i} k_{j,i} p^i, whose sum is n, so the pre-image lies in S.\n\nInjectivity.  Uniqueness of p-adic expansion implies that the digit tables coincide whenever the k_j ’s coincide.  Therefore Φ is bijective, as required.\n\nPart (c).  Put p = 2, d = 3.  Then n_i ∈ {0,1} for all i.\n\n(i)  Apply (★):\n\n  N_{2,3}(n) = ∏_{i=0}^{t} C(n_i + 2 , 2)  \n\n         = ∏_{i=0}^{t} (n_i + 1)(n_i + 2)/2.  \n\nBecause n_i is 0 or 1,  \n\n  n_i = 0 ⇒ factor = (1·2)/2 = 1,  \n  n_i = 1 ⇒ factor = (2·3)/2 = 3.\n\nHence  \n\n  N_{2,3}(n) = 3^{s₁(n)}, where s₁(n)=#{i : n_i=1}.     (5)\n\nThis is exactly the number of odd coefficients in the trinomial row.\n\n(ii)  All coefficients would be even iff N_{2,3}(n) = 0, but (5) is a positive power of 3 for every n (including n = 0, when it equals 1).  Consequently no non-negative integer n enjoys the requested property; at least one coefficient is always odd. ∎",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.482146",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher-Dimensional Generalization – The problem moves from the ordinary binomial coefficients (d = 2) to arbitrary-dimension multinomial coefficients.  This introduces compositions of digits instead of single digits and necessitates the multivariable stars-and-bars technique.\n\n2. Deeper Number-Theoretic Tool – The solution requires the full multinomial version of Lucas’s theorem, not just the classical binomial form.\n\n3. Interaction of Several Concepts – Correct handling of p-adic carries, independence of digit positions, and enumeration of digit compositions must all mesh flawlessly.\n\n4. Additional Tasks – Part (b) forces contestants to construct an explicit bijection (not just count), while part (c) demands interpreting the general formula in a concrete special case and drawing a new conclusion.\n\n5. Exponential Growth of Complexity – Whereas the original problem led to a simple power of 2, our answer involves products of binomial numbers whose sizes vary with both the number of base-p digits and the dimension d, significantly complicating both statement and proof."
      }
    },
    "original_kernel_variant": {
      "question": "Let p be a prime and let d ≥ 2 be a fixed integer.  \nFor every non-negative integer n write its p–adic expansion  \n\n  n = n₀ + n₁p + n₂p² + … + n_tpᵗ  (0 ≤ n_i ≤ p–1).  \n\nConsider the multinomial expansion  \n\n  (x₁ + x₂ + … + x_d)ⁿ =  Σ_{k₁+…+k_d = n}  M(k₁,…,k_d)·x₁^{k₁}…x_d^{k_d},  \n\nwhere the multinomial coefficient is  \n\n  M(k₁,…,k_d) = n! /(k₁!…k_d!).  \n\n(a) Prove that the exact number of multinomial coefficients M(k₁,…,k_d) that are NOT divisible by p equals  \n\n  N_{p,d}(n) =  ∏_{i=0}^{t}  C(n_i + d − 1 , d − 1).   (★)\n\n(b) Describe bijectively the set of d–tuples (k₁,…,k_d) that contribute to N_{p,d}(n) in terms of the p–adic digits of the k_j ’s and of n.\n\n(c) Specialise to d = 3 and p = 2.  \n(i) Show that the number of odd trinomial coefficients in (x + y + z)ⁿ equals 3^{s₁(n)}, where s₁(n) is the number of 1–digits in the binary expansion of n.  \n(ii) Deduce that there is no non–negative integer n for which every trinomial coefficient in the expansion of (x + y + z)ⁿ is even.",
      "solution": "Throughout v_p(·) denotes the p–adic valuation.  We shall use the following d-dimensional version of Lucas’ theorem.\n\nLemma 1 (Multinomial Lucas).  \nLet  \n\n  n = ∑_{i=0}^{t} n_i p^i,    \n  k_j = ∑_{i=0}^{t} k_{j,i} p^i  (0 ≤ k_{j,i} ≤ p−1, 1 ≤ j ≤ d).\n\nDefine, for every digit i,  \n\n  M_i(k_{1,i},…,k_{d,i}) :=  \n  ⎧ C(n_i ; k_{1,i},…,k_{d,i}) = n_i!/(k_{1,i}!…k_{d,i}!),  if ∑_{j=1}^{d} k_{j,i} = n_i,  \n  ⎨  \n  ⎩ 0, otherwise.  \n\nThen  \n\n  M(k₁,…,k_d) ≡  ∏_{i=0}^{t}  M_i(k_{1,i},…,k_{d,i})  (mod p).     (1)\n\nProof.  The classical proof of Lucas’ congruence for multinomial coefficients expands n! and every k_j! in base-p blocks of size p^i – p^{i−1}.  After cancelling equal factors one is left, modulo p, with a product of ordinary multinomial numbers coming from each digit.  Whenever the digit–wise sums disagree with n_i, at least one factor is a multinomial with upper index n_i but total lower index > n_i; that multinomial is declared 0 and kills the entire product. ∎\n\nBecause every factorial below p is a unit in ℤ_p, each non–zero M_i is automatically coprime to p.  Therefore  \n\n  p ∤ M(k₁,…,k_d)   ⇔  M_i(k_{1,i},…,k_{d,i}) ≠ 0 for every i.     (2)\n\nEquivalently, no p-adic carry is allowed when the d digit vectors (k_{1,i},…,k_{d,i}) are added.\n\nPart (a).  Fix a digit position i.  To satisfy (2) one must choose\n\n  (k_{1,i},…,k_{d,i}) ∈ {0,…,p−1}^d with ∑_{j=1}^d k_{j,i} = n_i.     (3)\n\nBecause n_i ≤ p−1, every such choice automatically forbids carries inside the digit.  The number of admissible d-tuples in (3) is the standard stars-and-bars count\n\n  C(n_i + d − 1 , d − 1).     (4)\n\nDigit positions are independent once carries are excluded; hence the total number of global d-tuples (k₁,…,k_d) satisfying p ∤ M(k₁,…,k_d) is the product of (4) over i = 0,…,t, proving (★).\n\nPart (b).  A concrete bijection.  \nLet  \n\n  S = { (k₁,…,k_d) ∈ ℕ^d | ∑_{j=1}^d k_j = n and p ∤ M(k₁,…,k_d) }.  \nFor i = 0,…,t put  \n\n  C_i = { (a₁,…,a_d) ∈ {0,…,p−1}^d | ∑_{j=1}^{d} a_j = n_i }.  \n\nDefine  \n\n  Φ : S → C_0 × … × C_t,  (k₁,…,k_d) ↦ ((k_{1,0},…,k_{d,0}),…, (k_{1,t},…,k_{d,t})).  \n\nSurjectivity.  Any choice of vectors in C_0×…×C_t specifies unique digits k_{j,i}; assembling them gives k_j = ∑_{i} k_{j,i} p^i, whose sum is n, so the pre-image lies in S.\n\nInjectivity.  Uniqueness of p-adic expansion implies that the digit tables coincide whenever the k_j ’s coincide.  Therefore Φ is bijective, as required.\n\nPart (c).  Put p = 2, d = 3.  Then n_i ∈ {0,1} for all i.\n\n(i)  Apply (★):\n\n  N_{2,3}(n) = ∏_{i=0}^{t} C(n_i + 2 , 2)  \n\n         = ∏_{i=0}^{t} (n_i + 1)(n_i + 2)/2.  \n\nBecause n_i is 0 or 1,  \n\n  n_i = 0 ⇒ factor = (1·2)/2 = 1,  \n  n_i = 1 ⇒ factor = (2·3)/2 = 3.\n\nHence  \n\n  N_{2,3}(n) = 3^{s₁(n)}, where s₁(n)=#{i : n_i=1}.     (5)\n\nThis is exactly the number of odd coefficients in the trinomial row.\n\n(ii)  All coefficients would be even iff N_{2,3}(n) = 0, but (5) is a positive power of 3 for every n (including n = 0, when it equals 1).  Consequently no non-negative integer n enjoys the requested property; at least one coefficient is always odd. ∎",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.404147",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher-Dimensional Generalization – The problem moves from the ordinary binomial coefficients (d = 2) to arbitrary-dimension multinomial coefficients.  This introduces compositions of digits instead of single digits and necessitates the multivariable stars-and-bars technique.\n\n2. Deeper Number-Theoretic Tool – The solution requires the full multinomial version of Lucas’s theorem, not just the classical binomial form.\n\n3. Interaction of Several Concepts – Correct handling of p-adic carries, independence of digit positions, and enumeration of digit compositions must all mesh flawlessly.\n\n4. Additional Tasks – Part (b) forces contestants to construct an explicit bijection (not just count), while part (c) demands interpreting the general formula in a concrete special case and drawing a new conclusion.\n\n5. Exponential Growth of Complexity – Whereas the original problem led to a simple power of 2, our answer involves products of binomial numbers whose sizes vary with both the number of base-p digits and the dimension d, significantly complicating both statement and proof."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}