{
  "index": "2002-A-3",
  "type": "COMB",
  "tag": [
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "Let $n \\geq 2$ be an integer and $T_n$ be the number of non-empty\nsubsets $S$ of $\\{1, 2, 3, \\dots, n\\}$ with the property that the\naverage of the elements of $S$ is an integer. Prove that\n$T_n - n$ is always even.",
  "solution": "Note that each of the sets $\\{1\\}, \\{2\\}, \\dots, \\{n\\}$ has the\ndesired property. Moreover, for each set $S$ with integer average $m$\nthat does not contain $m$, $S \\cup \\{m\\}$ also has average $m$,\nwhile for each set $T$ of more than one element with integer average\n$m$ that contains $m$, $T \\setminus \\{m\\}$ also has average $m$.\nThus the subsets other than $\\{1\\}, \\{2\\}, \\dots, \\{n\\}$ can be grouped\nin pairs, so $T_n - n$ is even.",
  "vars": [
    "S",
    "m",
    "T"
  ],
  "params": [
    "n",
    "T_n"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "S": "subsetvar",
        "m": "meanvalue",
        "T": "largergrp",
        "n": "upperbound",
        "T_n": "subsetcount"
      },
      "question": "Let $upperbound \\geq 2$ be an integer and $subsetcount$ be the number of non-empty\nsubsets $subsetvar$ of $\\{1, 2, 3, \\dots, upperbound\\}$ with the property that the\naverage of the elements of $subsetvar$ is an integer. Prove that\n$subsetcount - upperbound$ is always even.",
      "solution": "Note that each of the sets $\\{1\\}, \\{2\\}, \\dots, \\{upperbound\\}$ has the\ndesired property. Moreover, for each set $subsetvar$ with integer average $meanvalue$\nthat does not contain $meanvalue$, $subsetvar \\cup \\{meanvalue\\}$ also has average $meanvalue$,\nwhile for each set $largergrp$ of more than one element with integer average\n$meanvalue$ that contains $meanvalue$, $largergrp \\setminus \\{meanvalue\\}$ also has average $meanvalue$.\nThus the subsets other than $\\{1\\}, \\{2\\}, \\dots, \\{upperbound\\}$ can be grouped\nin pairs, so $subsetcount - upperbound$ is even."
    },
    "descriptive_long_confusing": {
      "map": {
        "S": "sunflower",
        "m": "waterfall",
        "T": "whirlwind",
        "n": "pavilion",
        "T_n": "panorama"
      },
      "question": "Let $pavilion \\geq 2$ be an integer and $panorama$ be the number of non-empty\nsubsets $sunflower$ of $\\{1, 2, 3, \\dots, pavilion\\}$ with the property that the\naverage of the elements of $sunflower$ is an integer. Prove that\n$panorama - pavilion$ is always even.",
      "solution": "Note that each of the sets $\\{1\\}, \\{2\\}, \\dots, \\{pavilion\\}$ has the\ndesired property. Moreover, for each set $sunflower$ with integer average $waterfall$\nthat does not contain $waterfall$, $sunflower \\cup \\{waterfall\\}$ also has average $waterfall$,\nwhile for each set $whirlwind$ of more than one element with integer average\n$waterfall$ that contains $waterfall$, $whirlwind \\setminus \\{waterfall\\}$ also has average $waterfall$.\nThus the subsets other than $\\{1\\}, \\{2\\}, \\dots, \\{pavilion\\}$ can be grouped\nin pairs, so $panorama - pavilion$ is even."
    },
    "descriptive_long_misleading": {
      "map": {
        "S": "superset",
        "m": "variance",
        "T": "universe",
        "n": "infinite",
        "T_n": "emptiness"
      },
      "question": "Let $infinite \\geq 2$ be an integer and $emptiness$ be the number of non-empty\nsubsets $superset$ of $\\{1, 2, 3, \\dots, infinite\\}$ with the property that the\naverage of the elements of $superset$ is an integer. Prove that\n$emptiness - infinite$ is always even.",
      "solution": "Note that each of the sets $\\{1\\}, \\{2\\}, \\dots, \\{infinite\\}$ has the\ndesired property. Moreover, for each set $superset$ with integer average $variance$\nthat does not contain $variance$, $superset \\cup \\{variance\\}$ also has average $variance$,\nwhile for each set $universe$ of more than one element with integer average\n$variance$ that contains $variance$, $universe \\setminus \\{variance\\}$ also has average $variance$.\nThus the subsets other than $\\{1\\}, \\{2\\}, \\dots, \\{infinite\\}$ can be grouped\nin pairs, so $emptiness - infinite$ is even."
    },
    "garbled_string": {
      "map": {
        "S": "qzxwvtnp",
        "m": "hjgrksla",
        "T": "vbfjdnqe",
        "n": "xgtrmzpl",
        "T_n": "rckpvasm"
      },
      "question": "Let $xgtrmzpl \\geq 2$ be an integer and $rckpvasm$ be the number of non-empty\nsubsets $qzxwvtnp$ of $\\{1, 2, 3, \\dots, xgtrmzpl\\}$ with the property that the\naverage of the elements of $qzxwvtnp$ is an integer. Prove that\n$rckpvasm - xgtrmzpl$ is always even.",
      "solution": "Note that each of the sets $\\{1\\}, \\{2\\}, \\dots, \\{xgtrmzpl\\}$ has the\ndesired property. Moreover, for each set $qzxwvtnp$ with integer average $hjgrksla$\nthat does not contain $hjgrksla$, $qzxwvtnp \\cup \\{hjgrksla\\}$ also has average $hjgrksla$,\nwhile for each set $vbfjdnqe$ of more than one element with integer average\n$hjgrksla$ that contains $hjgrksla$, $vbfjdnqe \\setminus \\{hjgrksla\\}$ also has average $hjgrksla$.\nThus the subsets other than $\\{1\\}, \\{2\\}, \\dots, \\{xgtrmzpl\\}$ can be grouped\nin pairs, so $rckpvasm - xgtrmzpl$ is even."
    },
    "kernel_variant": {
      "question": "Fix an odd prime $p$ and an integer $d\\ge 2$.  \nPut  \n\\[\nV=\\{0,1,\\dots ,p-1\\}^{d}\\;\\simeq\\;(\\mathbb{Z}/p\\mathbb{Z})^{d},\n\\qquad |V|=p^{d},\n\\]  \nand for every non–empty subset $S\\subseteq V$ write its vector sum  \n\n\\[\n\\sigma(S)=\\sum_{x\\in S}x \\pmod{p}\\qquad(\\text{component–wise}).\n\\]\n\nLet  \n\n\\[\n\\Delta=\\{(t,t,\\dots ,t)\\; :\\; t\\in\\mathbb{Z}/p\\mathbb{Z}\\}\\le (\\mathbb{Z}/p\\mathbb{Z})^{d}\n\\]\n\nbe the $1$–dimensional diagonal subspace and define  \n\n\\[\nD_{p,d}= \\bigl|\\{\\,S\\subseteq V : S\\neq\\varnothing,\\ \\sigma(S)\\in\\Delta \\}\\bigr|.\n\\]\n\n(1) Show that the exact closed formula  \n\\[\n\\boxed{\\;\nD_{p,d}=p^{-(d-1)}\\Bigl(2^{\\,p^{d}}+\\bigl(p^{\\,d-1}-1\\bigr)\\,2^{\\,p^{d-1}}-p^{\\,d-1}\\Bigr)\n\\;}\n\\tag{F}\n\\]\n\nholds for every $d\\ge 2$.\n\n(2) Deduce the arithmetic consequences  \n\n\\[\n\\boxed{\\;\n\\nu_{p}\\!\\bigl(D_{p,d}\\bigr)=0\\quad\\text{and}\\quad D_{p,d}\\equiv 1\\pmod{p}}\n\\]\n\nfor all $d\\ge 2$.  \nIn particular $D_{p,2}\\equiv 1\\pmod{p}$ and for every $d\\ge 3$ the\nnumber $D_{p,d}$ is not divisible by $p$ (hence by no higher power of $p$).\n\n--------------------------------------------------------------------",
      "solution": "Throughout put  \n\\[\nG=(\\mathbb{Z}/p\\mathbb{Z})^{d},\\qquad |G|=p^{d},\\qquad \n\\zeta=e^{2\\pi i/p},\n\\]  \nand for $u=(u_{1},\\dots ,u_{d})\\in G$ define the additive character  \n\n\\[\n\\chi_{u}(x)=\\zeta^{\\langle u,x\\rangle},\n\\qquad x\\in G,\n\\]  \nwhere $\\langle u,x\\rangle=u_{1}x_{1}+\\dots +u_{d}x_{d}\\pmod{p}$.\nThe family $\\{\\chi_{u}\\}_{u\\in G}$ is an orthonormal basis of $\\mathbb{C}[G]$.\n\n--------------------------------------------------------------------\nStep 1.  Fourier expansion of the diagonal indicator  \n--------------------------------------------------------------------\nFor a subgroup $H\\le G$ and its annihilator\n$H^{\\perp}:=\\{u\\in G:\\langle u,h\\rangle=0\\ \\forall\\,h\\in H\\}$,\northogonality gives  \n\n\\[\n\\mathbf 1_{H}(x)=\\frac{1}{|H^{\\perp}|}\\sum_{u\\in H^{\\perp}}\\chi_{u}(x).\n\\tag{1}\n\\]\n\nHere \\(H=\\Delta\\) has \\(|\\Delta|=p\\) and therefore  \n\n\\[\n|\\Delta^{\\perp}|=\\frac{|G|}{|\\Delta|}=p^{\\,d-1}.\n\\]\n\nHence  \n\n\\[\n\\boxed{\\;\n\\mathbf 1_{\\Delta}(v)=\\frac{1}{p^{\\,d-1}}\n\\sum_{u\\in\\Delta^{\\perp}}\\chi_{u}(v)\\;} \\qquad(v\\in G).\n\\tag{2}\n\\]\n\n--------------------------------------------------------------------\nStep 2.  Transforming the counting problem  \n--------------------------------------------------------------------\nBy definition  \n\n\\[\nD_{p,d}= \\sum_{\\varnothing\\neq S\\subseteq G}\\mathbf 1_{\\Delta}\\bigl(\\sigma(S)\\bigr)\n       =\\frac{1}{p^{\\,d-1}}\n         \\sum_{u\\in\\Delta^{\\perp}}\n         \\sum_{\\varnothing\\neq S\\subseteq G}\\chi_{u}\\bigl(\\sigma(S)\\bigr).\n\\tag{3}\n\\]\n\nBecause \\(\\chi_{u}\\bigl(\\sigma(S)\\bigr)=\\prod_{x\\in S}\\chi_{u}(x)\\), we have  \n\n\\[\n\\sum_{S\\subseteq G}\\chi_{u}\\bigl(\\sigma(S)\\bigr)=\n\\prod_{x\\in G}\\bigl(1+\\chi_{u}(x)\\bigr)=:P(u).\n\\tag{4}\n\\]\n\n(The empty set contributes $1$; subtracting it later eliminates $S=\\varnothing$.)  \nThus  \n\n\\[\nD_{p,d}= \\frac{1}{p^{\\,d-1}}\\sum_{u\\in\\Delta^{\\perp}}\\bigl(P(u)-1\\bigr).\n\\tag{5}\n\\]\n\n--------------------------------------------------------------------\nStep 3.  Evaluating the products \\(P(u)\\)  \n--------------------------------------------------------------------\n(a) \\(u=0\\):  then \\(\\chi_{0}\\equiv 1\\) and  \n\n\\[\nP(0)=2^{\\,|G|}=2^{\\,p^{d}}.\n\\]\n\n(b) \\(u\\neq 0\\):  the multiset \\(\\{\\chi_{u}(x):x\\in G\\}\\) contains every\n$p$-th root of unity exactly $p^{\\,d-1}$ times, hence  \n\n\\[\nP(u)=\\prod_{k=0}^{p-1}(1+\\zeta^{\\,k})^{\\,p^{\\,d-1}}.\n\\]\n\nBecause \\(\\prod_{k=0}^{p-1}(1+\\zeta^{\\,k})=2\\) (a standard cyclotomic identity),  \n\n\\[\n\\boxed{\\;P(u)=2^{\\,p^{\\,d-1}}\\;} \n\\qquad(\\text{for every }0\\neq u\\in\\Delta^{\\perp}).\n\\tag{6}\n\\]\n\n--------------------------------------------------------------------\nStep 4.  A closed formula for \\(D_{p,d}\\)  \n--------------------------------------------------------------------\nSince \\(|\\Delta^{\\perp}|=p^{\\,d-1}\\) and \\(\\Delta^{\\perp}\\) has\nexactly one zero vector, (5) and (6) give  \n\n\\[\n\\sum_{u\\in\\Delta^{\\perp}}P(u)=2^{\\,p^{d}}\n      +(p^{\\,d-1}-1)\\,2^{\\,p^{\\,d-1}}.\n\\]\n\nTherefore  \n\n\\[\n\\boxed{\\;\nD_{p,d}=p^{-(d-1)}\\Bigl(2^{\\,p^{d}}\n +(p^{\\,d-1}-1)\\,2^{\\,p^{\\,d-1}}-p^{\\,d-1}\\Bigr)},\n\\tag{F revisited}\n\\]\nwhich is exactly the claimed formula (F).\n\n--------------------------------------------------------------------\nStep 5.  \\(p\\)-adic valuation of the numerator  \n--------------------------------------------------------------------\nPut  \n\n\\[\nA:=2^{\\,p^{\\,d-1}}\\qquad\\bigl(A\\equiv 2\\pmod{p}\\bigr),\n\\quad \nB:= 2^{\\,p^{d}}+(p^{\\,d-1}-1)A-p^{\\,d-1}.\n\\]\n\nBecause \\(2^{\\,p^{d}}=A^{p}\\), the bracket can be rewritten as  \n\n\\[\nB=A^{p}-A+p^{\\,d-1}(A-1)\n  =(A-1)\\bigl(A\\sum_{k=0}^{p-2}A^{k}+p^{\\,d-1}\\bigr).\n\\tag{7}\n\\]\n\n(i)  Since \\(A\\equiv 2\\pmod{p}\\), we have \\(A-1\\equiv 1\\pmod{p}\\); hence  \n\n\\[\n\\nu_{p}(A-1)=0.\n\\tag{8}\n\\]\n\n(ii)  To evaluate \\(\\nu_{p}(A^{p}-A)\\) we note\n\\(A^{p}-A=A(A^{p-1}-1)\\) and use the Lifting-The-Exponent lemma:\n\n\\[\n\\nu_{p}(A^{p}-A)=\\nu_{p}(2^{\\,p^{d}}-2^{\\,p^{d-1}})\n               =\\nu_{p}(2^{\\,p-1}-1)+\\nu_{p}(p^{\\,d-1})\n               =(d-1)+w,\n\\tag{9}\n\\]\nwhere \\(w:=\\nu_{p}(2^{\\,p-1}-1)\\ge 1\\) (with \\(w=1\\) for non-Wieferich primes).\n\n(iii)  The second summand in (7) has  \n\n\\[\n\\nu_{p}\\bigl(p^{\\,d-1}(A-1)\\bigr)=(d-1)+0=d-1.\n\\tag{10}\n\\]\n\nSince \\(d-1 < w+d-1\\), the smaller $p$-adic order in (7) is always \\(d-1\\); consequently  \n\n\\[\n\\boxed{\\;\\nu_{p}(B)=d-1\\;}.\n\\tag{11}\n\\]\n\n--------------------------------------------------------------------\nStep 6.  Finishing the valuation  \n--------------------------------------------------------------------\nFrom (F) we have \\(D_{p,d}=p^{-(d-1)}B\\).  Using (11),\n\n\\[\n\\nu_{p}\\bigl(D_{p,d}\\bigr)=\\nu_{p}(B)-(d-1)=0.\n\\]\n\nHence \\(p\\nmid D_{p,d}\\).\nMoreover, dividing (7) by \\(p^{\\,d-1}\\) we get  \n\n\\[\nD_{p,d}\\equiv (A-1)\\equiv 1\\pmod{p},\n\\]\n\nbecause \\(A\\equiv 2\\pmod{p}\\).  \nThis proves the claimed congruence and completes the solution. ∎\n\n--------------------------------------------------------------------",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.775363",
        "was_fixed": false,
        "difficulty_analysis": "Compared with the original one–dimensional problem, the enhanced variant\nintroduces several layers of additional technical complexity.\n\n1. Higher-dimensional ambient set  \n   – We work in an nᵈ lattice with d ≥ 2, not in a single interval.\n\n2. Constrained centroid geometry  \n   – The centroid must be the full diagonal point (m,m,…,m); this couples\n     all d coordinate–sums simultaneously and forces the solver to control\n     the interaction of several variables at once.\n\n3. Non-trivial verification of centroid preservation  \n   – Showing that the simple add/remove operation keeps *all* coordinates\n     of the centroid equal requires vector calculus and careful use of the\n     centroid condition in d dimensions.\n\n4. Partition of the solution space by centroid value  \n   – Unlike the original statement, there are n⁰ rather than n possible\n     centroids, and the proof must show the pairing mechanism works\n     independently inside each fibre.\n\nThese extra structural demands require the solver to juggle several\ninteracting concepts—vector sums, multi-coordinate means, and centroid\nfibre decompositions—making the argument substantially more intricate than\nthe original pairing in one dimension."
      }
    },
    "original_kernel_variant": {
      "question": "Fix an odd prime $p$ and an integer $d\\ge 2$.  \nPut  \n\\[\nV=\\{0,1,\\dots ,p-1\\}^{d}\\;\\simeq\\;(\\mathbb{Z}/p\\mathbb{Z})^{d},\n\\qquad |V|=p^{d},\n\\]  \nand for every non–empty subset $S\\subseteq V$ write its vector sum  \n\n\\[\n\\sigma(S)=\\sum_{x\\in S}x \\pmod{p}\\qquad(\\text{component–wise}).\n\\]\n\nLet  \n\n\\[\n\\Delta=\\{(t,t,\\dots ,t)\\; :\\; t\\in\\mathbb{Z}/p\\mathbb{Z}\\}\\le (\\mathbb{Z}/p\\mathbb{Z})^{d}\n\\]\n\nbe the $1$–dimensional diagonal subspace and define  \n\n\\[\nD_{p,d}= \\bigl|\\{\\,S\\subseteq V : S\\neq\\varnothing,\\ \\sigma(S)\\in\\Delta \\}\\bigr|.\n\\]\n\n(1) Show that the exact closed formula  \n\\[\n\\boxed{\\;\nD_{p,d}=p^{-(d-1)}\\Bigl(2^{\\,p^{d}}+\\bigl(p^{\\,d-1}-1\\bigr)\\,2^{\\,p^{d-1}}-p^{\\,d-1}\\Bigr)\n\\;}\n\\tag{F}\n\\]\n\nholds for every $d\\ge 2$.\n\n(2) Deduce the arithmetic consequences  \n\n\\[\n\\boxed{\\;\n\\nu_{p}\\!\\bigl(D_{p,d}\\bigr)=0\\quad\\text{and}\\quad D_{p,d}\\equiv 1\\pmod{p}}\n\\]\n\nfor all $d\\ge 2$.  \nIn particular $D_{p,2}\\equiv 1\\pmod{p}$ and for every $d\\ge 3$ the\nnumber $D_{p,d}$ is not divisible by $p$ (hence by no higher power of $p$).\n\n--------------------------------------------------------------------",
      "solution": "Throughout put  \n\\[\nG=(\\mathbb{Z}/p\\mathbb{Z})^{d},\\qquad |G|=p^{d},\\qquad \n\\zeta=e^{2\\pi i/p},\n\\]  \nand for $u=(u_{1},\\dots ,u_{d})\\in G$ define the additive character  \n\n\\[\n\\chi_{u}(x)=\\zeta^{\\langle u,x\\rangle},\n\\qquad x\\in G,\n\\]  \nwhere $\\langle u,x\\rangle=u_{1}x_{1}+\\dots +u_{d}x_{d}\\pmod{p}$.\nThe family $\\{\\chi_{u}\\}_{u\\in G}$ is an orthonormal basis of $\\mathbb{C}[G]$.\n\n--------------------------------------------------------------------\nStep 1.  Fourier expansion of the diagonal indicator  \n--------------------------------------------------------------------\nFor a subgroup $H\\le G$ and its annihilator\n$H^{\\perp}:=\\{u\\in G:\\langle u,h\\rangle=0\\ \\forall\\,h\\in H\\}$,\northogonality gives  \n\n\\[\n\\mathbf 1_{H}(x)=\\frac{1}{|H^{\\perp}|}\\sum_{u\\in H^{\\perp}}\\chi_{u}(x).\n\\tag{1}\n\\]\n\nHere \\(H=\\Delta\\) has \\(|\\Delta|=p\\) and therefore  \n\n\\[\n|\\Delta^{\\perp}|=\\frac{|G|}{|\\Delta|}=p^{\\,d-1}.\n\\]\n\nHence  \n\n\\[\n\\boxed{\\;\n\\mathbf 1_{\\Delta}(v)=\\frac{1}{p^{\\,d-1}}\n\\sum_{u\\in\\Delta^{\\perp}}\\chi_{u}(v)\\;} \\qquad(v\\in G).\n\\tag{2}\n\\]\n\n--------------------------------------------------------------------\nStep 2.  Transforming the counting problem  \n--------------------------------------------------------------------\nBy definition  \n\n\\[\nD_{p,d}= \\sum_{\\varnothing\\neq S\\subseteq G}\\mathbf 1_{\\Delta}\\bigl(\\sigma(S)\\bigr)\n       =\\frac{1}{p^{\\,d-1}}\n         \\sum_{u\\in\\Delta^{\\perp}}\n         \\sum_{\\varnothing\\neq S\\subseteq G}\\chi_{u}\\bigl(\\sigma(S)\\bigr).\n\\tag{3}\n\\]\n\nBecause \\(\\chi_{u}\\bigl(\\sigma(S)\\bigr)=\\prod_{x\\in S}\\chi_{u}(x)\\), we have  \n\n\\[\n\\sum_{S\\subseteq G}\\chi_{u}\\bigl(\\sigma(S)\\bigr)=\n\\prod_{x\\in G}\\bigl(1+\\chi_{u}(x)\\bigr)=:P(u).\n\\tag{4}\n\\]\n\n(The empty set contributes $1$; subtracting it later eliminates $S=\\varnothing$.)  \nThus  \n\n\\[\nD_{p,d}= \\frac{1}{p^{\\,d-1}}\\sum_{u\\in\\Delta^{\\perp}}\\bigl(P(u)-1\\bigr).\n\\tag{5}\n\\]\n\n--------------------------------------------------------------------\nStep 3.  Evaluating the products \\(P(u)\\)  \n--------------------------------------------------------------------\n(a) \\(u=0\\):  then \\(\\chi_{0}\\equiv 1\\) and  \n\n\\[\nP(0)=2^{\\,|G|}=2^{\\,p^{d}}.\n\\]\n\n(b) \\(u\\neq 0\\):  the multiset \\(\\{\\chi_{u}(x):x\\in G\\}\\) contains every\n$p$-th root of unity exactly $p^{\\,d-1}$ times, hence  \n\n\\[\nP(u)=\\prod_{k=0}^{p-1}(1+\\zeta^{\\,k})^{\\,p^{\\,d-1}}.\n\\]\n\nBecause \\(\\prod_{k=0}^{p-1}(1+\\zeta^{\\,k})=2\\) (a standard cyclotomic identity),  \n\n\\[\n\\boxed{\\;P(u)=2^{\\,p^{\\,d-1}}\\;} \n\\qquad(\\text{for every }0\\neq u\\in\\Delta^{\\perp}).\n\\tag{6}\n\\]\n\n--------------------------------------------------------------------\nStep 4.  A closed formula for \\(D_{p,d}\\)  \n--------------------------------------------------------------------\nSince \\(|\\Delta^{\\perp}|=p^{\\,d-1}\\) and \\(\\Delta^{\\perp}\\) has\nexactly one zero vector, (5) and (6) give  \n\n\\[\n\\sum_{u\\in\\Delta^{\\perp}}P(u)=2^{\\,p^{d}}\n      +(p^{\\,d-1}-1)\\,2^{\\,p^{\\,d-1}}.\n\\]\n\nTherefore  \n\n\\[\n\\boxed{\\;\nD_{p,d}=p^{-(d-1)}\\Bigl(2^{\\,p^{d}}\n +(p^{\\,d-1}-1)\\,2^{\\,p^{\\,d-1}}-p^{\\,d-1}\\Bigr)},\n\\tag{F revisited}\n\\]\nwhich is exactly the claimed formula (F).\n\n--------------------------------------------------------------------\nStep 5.  \\(p\\)-adic valuation of the numerator  \n--------------------------------------------------------------------\nPut  \n\n\\[\nA:=2^{\\,p^{\\,d-1}}\\qquad\\bigl(A\\equiv 2\\pmod{p}\\bigr),\n\\quad \nB:= 2^{\\,p^{d}}+(p^{\\,d-1}-1)A-p^{\\,d-1}.\n\\]\n\nBecause \\(2^{\\,p^{d}}=A^{p}\\), the bracket can be rewritten as  \n\n\\[\nB=A^{p}-A+p^{\\,d-1}(A-1)\n  =(A-1)\\bigl(A\\sum_{k=0}^{p-2}A^{k}+p^{\\,d-1}\\bigr).\n\\tag{7}\n\\]\n\n(i)  Since \\(A\\equiv 2\\pmod{p}\\), we have \\(A-1\\equiv 1\\pmod{p}\\); hence  \n\n\\[\n\\nu_{p}(A-1)=0.\n\\tag{8}\n\\]\n\n(ii)  To evaluate \\(\\nu_{p}(A^{p}-A)\\) we note\n\\(A^{p}-A=A(A^{p-1}-1)\\) and use the Lifting-The-Exponent lemma:\n\n\\[\n\\nu_{p}(A^{p}-A)=\\nu_{p}(2^{\\,p^{d}}-2^{\\,p^{d-1}})\n               =\\nu_{p}(2^{\\,p-1}-1)+\\nu_{p}(p^{\\,d-1})\n               =(d-1)+w,\n\\tag{9}\n\\]\nwhere \\(w:=\\nu_{p}(2^{\\,p-1}-1)\\ge 1\\) (with \\(w=1\\) for non-Wieferich primes).\n\n(iii)  The second summand in (7) has  \n\n\\[\n\\nu_{p}\\bigl(p^{\\,d-1}(A-1)\\bigr)=(d-1)+0=d-1.\n\\tag{10}\n\\]\n\nSince \\(d-1 < w+d-1\\), the smaller $p$-adic order in (7) is always \\(d-1\\); consequently  \n\n\\[\n\\boxed{\\;\\nu_{p}(B)=d-1\\;}.\n\\tag{11}\n\\]\n\n--------------------------------------------------------------------\nStep 6.  Finishing the valuation  \n--------------------------------------------------------------------\nFrom (F) we have \\(D_{p,d}=p^{-(d-1)}B\\).  Using (11),\n\n\\[\n\\nu_{p}\\bigl(D_{p,d}\\bigr)=\\nu_{p}(B)-(d-1)=0.\n\\]\n\nHence \\(p\\nmid D_{p,d}\\).\nMoreover, dividing (7) by \\(p^{\\,d-1}\\) we get  \n\n\\[\nD_{p,d}\\equiv (A-1)\\equiv 1\\pmod{p},\n\\]\n\nbecause \\(A\\equiv 2\\pmod{p}\\).  \nThis proves the claimed congruence and completes the solution. ∎\n\n--------------------------------------------------------------------",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.593671",
        "was_fixed": false,
        "difficulty_analysis": "Compared with the original one–dimensional problem, the enhanced variant\nintroduces several layers of additional technical complexity.\n\n1. Higher-dimensional ambient set  \n   – We work in an nᵈ lattice with d ≥ 2, not in a single interval.\n\n2. Constrained centroid geometry  \n   – The centroid must be the full diagonal point (m,m,…,m); this couples\n     all d coordinate–sums simultaneously and forces the solver to control\n     the interaction of several variables at once.\n\n3. Non-trivial verification of centroid preservation  \n   – Showing that the simple add/remove operation keeps *all* coordinates\n     of the centroid equal requires vector calculus and careful use of the\n     centroid condition in d dimensions.\n\n4. Partition of the solution space by centroid value  \n   – Unlike the original statement, there are n⁰ rather than n possible\n     centroids, and the proof must show the pairing mechanism works\n     independently inside each fibre.\n\nThese extra structural demands require the solver to juggle several\ninteracting concepts—vector sums, multi-coordinate means, and centroid\nfibre decompositions—making the argument substantially more intricate than\nthe original pairing in one dimension."
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}