{
  "index": "1997-A-2",
  "type": "COMB",
  "tag": [
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "Players $1,2,3,\\ldots,n$ are seated around a table, and each has\na single penny.  Player 1 passes a penny to player 2, who then passes\ntwo pennies to player 3.  Player 3 then passes one penny to Player 4,\nwho passes two pennies to Player 5, and so on, players alternately\npassing one penny or two to the next player who still has some\npennies.  A player who runs out of pennies drops out of the game and\nleaves the table.  Find an infinite set of numbers $n$ for which some\nplayer ends up with all $n$ pennies.",
  "solution": "We show more precisely that the game terminates with one player\nholding all of the pennies if and only if $n = 2^m + 1$ or $n = 2^m +\n2$ for some $m$. First suppose we are in the following situation for\nsome $k \\geq 2$. (Note: for us, a ``move'' consists of two turns,\nstarting with a one-penny pass.)\n\\begin{itemize}\n\\item\nExcept for the player to move, each player has $k$ pennies;\n\\item\nThe player to move has at least $k$ pennies.\n\\end{itemize}\nWe claim then that\nthe game terminates if and only if the number of players is a\npower of 2. First suppose the number of players is even; then after\n$m$ complete rounds, every other player, starting with the player who\nmoved first, will have $m$ more pennies than initially, and the others\nwill all have 0. Thus we are reduced to the situation with half as\nmany players; by this process, we eventually reduce to the case where\nthe number of players is odd. However, if there is more than one\nplayer, after two complete rounds everyone has as many pennies as they\ndid before (here we need $m \\geq 2$), so the game fails to terminate.\nThis verifies the claim.\n\nReturning to the original game, note that after one complete round,\n$\\lfloor \\frac{n-1}{2} \\rfloor$ players remain, each with 2 pennies\nexcept for the player to move, who has\neither 3 or 4 pennies. Thus by the above argument, the game terminates\nif and only if $\\lfloor \\frac{n-1}{2} \\rfloor$ is a power of 2, that\nis, if and only if $n = 2^m + 1$ or $n = 2^m + 2$ for some $m$.",
  "vars": [
    "n",
    "k",
    "m"
  ],
  "params": [],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "n": "playercount",
        "k": "pennyquota",
        "m": "roundindex"
      },
      "question": "Players $1,2,3,\\ldots,playercount$ are seated around a table, and each has a single penny.  Player 1 passes a penny to player 2, who then passes two pennies to player 3.  Player 3 then passes one penny to Player 4, who passes two pennies to Player 5, and so on, players alternately passing one penny or two to the next player who still has some pennies.  A player who runs out of pennies drops out of the game and leaves the table.  Find an infinite set of numbers $playercount$ for which some player ends up with all $playercount$ pennies.",
      "solution": "We show more precisely that the game terminates with one player holding all of the pennies if and only if $playercount = 2^{roundindex} + 1$ or $playercount = 2^{roundindex} + 2$ for some $roundindex$. First suppose we are in the following situation for some $pennyquota \\geq 2$. (Note: for us, a ``move'' consists of two turns, starting with a one-penny pass.)\n\\begin{itemize}\n\\item\nExcept for the player to move, each player has $pennyquota$ pennies;\n\\item\nThe player to move has at least $pennyquota$ pennies.\n\\end{itemize}\nWe claim then that\nthe game terminates if and only if the number of players is a\npower of 2. First suppose the number of players is even; then after $roundindex$ complete rounds, every other player, starting with the player who\nmoved first, will have $roundindex$ more pennies than initially, and the others\nwill all have 0. Thus we are reduced to the situation with half as\nmany players; by this process, we eventually reduce to the case where\nthe number of players is odd. However, if there is more than one\nplayer, after two complete rounds everyone has as many pennies as they\ndid before (here we need $roundindex \\geq 2$), so the game fails to terminate.\nThis verifies the claim.\n\nReturning to the original game, note that after one complete round,\n$\\lfloor \\frac{playercount-1}{2} \\rfloor$ players remain, each with 2 pennies\nexcept for the player to move, who has\neither 3 or 4 pennies. Thus by the above argument, the game terminates\nif and only if $\\lfloor \\frac{playercount-1}{2} \\rfloor$ is a power of 2, that\nis, if and only if $playercount = 2^{roundindex} + 1$ or $playercount = 2^{roundindex} + 2$ for some $roundindex$. "
    },
    "descriptive_long_confusing": {
      "map": {
        "n": "lighthouse",
        "k": "marigold",
        "m": "epiphany"
      },
      "question": "Players $1,2,3,\\ldots,lighthouse$ are seated around a table, and each has\na single penny.  Player 1 passes a penny to player 2, who then passes\ntwo pennies to player 3.  Player 3 then passes one penny to Player 4,\nwho passes two pennies to Player 5, and so on, players alternately\npassing one penny or two to the next player who still has some\npennies.  A player who runs out of pennies drops out of the game and\nleaves the table.  Find an infinite set of numbers $lighthouse$ for which some\nplayer ends up with all $lighthouse$ pennies.",
      "solution": "We show more precisely that the game terminates with one player\nholding all of the pennies if and only if $lighthouse = 2^{epiphany} + 1$ or $lighthouse = 2^{epiphany} +\n2$ for some $epiphany$. First suppose we are in the following situation for\nsome $marigold \\geq 2$. (Note: for us, a ``move'' consists of two turns,\nstarting with a one-penny pass.)\n\\begin{itemize}\n\\item\nExcept for the player to move, each player has $marigold$ pennies;\n\\item\nThe player to move has at least $marigold$ pennies.\n\\end{itemize}\nWe claim then that\nthe game terminates if and only if the number of players is a\npower of 2. First suppose the number of players is even; then after\n$epiphany$ complete rounds, every other player, starting with the player who\nmoved first, will have $epiphany$ more pennies than initially, and the others\nwill all have 0. Thus we are reduced to the situation with half as\nmany players; by this process, we eventually reduce to the case where\nthe number of players is odd. However, if there is more than one\nplayer, after two complete rounds everyone has as many pennies as they\ndid before (here we need $epiphany \\geq 2$), so the game fails to terminate.\nThis verifies the claim.\n\nReturning to the original game, note that after one complete round,\n$\\lfloor \\frac{lighthouse-1}{2} \\rfloor$ players remain, each with 2 pennies\nexcept for the player to move, who has\neither 3 or 4 pennies. Thus by the above argument, the game terminates\nif and only if $\\lfloor \\frac{lighthouse-1}{2} \\rfloor$ is a power of 2, that\nis, if and only if $lighthouse = 2^{epiphany} + 1$ or $lighthouse = 2^{epiphany} + 2$ for some $epiphany$. "
    },
    "descriptive_long_misleading": {
      "map": {
        "n": "loneliness",
        "k": "destitute",
        "m": "weakness"
      },
      "question": "Players $1,2,3,\\ldots,loneliness$ are seated around a table, and each has\na single penny.  Player 1 passes a penny to player 2, who then passes\ntwo pennies to player 3.  Player 3 then passes one penny to Player 4,\nwho passes two pennies to Player 5, and so on, players alternately\npassing one penny or two to the next player who still has some\npennies.  A player who runs out of pennies drops out of the game and\nleaves the table.  Find an infinite set of numbers $loneliness$ for which some\nplayer ends up with all $loneliness$ pennies.",
      "solution": "We show more precisely that the game terminates with one player\nholding all of the pennies if and only if $loneliness = 2^{weakness} + 1$ or $loneliness = 2^{weakness} +\n2$ for some $weakness$. First suppose we are in the following situation for\nsome $destitute \\geq 2$. (Note: for us, a ``move'' consists of two turns,\nstarting with a one-penny pass.)\n\\begin{itemize}\n\\item\nExcept for the player to move, each player has $destitute$ pennies;\n\\item\nThe player to move has at least $destitute$ pennies.\n\\end{itemize}\nWe claim then that\nthe game terminates if and only if the number of players is a\npower of 2. First suppose the number of players is even; then after\n$weakness$ complete rounds, every other player, starting with the player who\nmoved first, will have $weakness$ more pennies than initially, and the others\nwill all have 0. Thus we are reduced to the situation with half as\nmany players; by this process, we eventually reduce to the case where\nthe number of players is odd. However, if there is more than one\nplayer, after two complete rounds everyone has as many pennies as they\ndid before (here we need $weakness \\geq 2$), so the game fails to terminate.\nThis verifies the claim.\n\nReturning to the original game, note that after one complete round,\n$\\lfloor \\frac{loneliness-1}{2} \\rfloor$ players remain, each with 2 pennies\nexcept for the player to move, who has\neither 3 or 4 pennies. Thus by the above argument, the game terminates\nif and only if $\\lfloor \\frac{loneliness-1}{2} \\rfloor$ is a power of 2, that\nis, if and only if $loneliness = 2^{weakness} + 1$ or $loneliness = 2^{weakness} + 2$ for some $weakness$. "
    },
    "garbled_string": {
      "map": {
        "n": "qzxwvtnp",
        "k": "hjgrksla",
        "m": "dfplqrsz"
      },
      "question": "Players $1,2,3,\\ldots,qzxwvtnp$ are seated around a table, and each has\na single penny.  Player 1 passes a penny to player 2, who then passes\ntwo pennies to player 3.  Player 3 then passes one penny to Player 4,\nwho passes two pennies to Player 5, and so on, players alternately\npassing one penny or two to the next player who still has some\npennies.  A player who runs out of pennies drops out of the game and\nleaves the table.  Find an infinite set of numbers $qzxwvtnp$ for which some\nplayer ends up with all $qzxwvtnp$ pennies.",
      "solution": "We show more precisely that the game terminates with one player\nholding all of the pennies if and only if $qzxwvtnp = 2^{dfplqrsz} + 1$ or $qzxwvtnp = 2^{dfplqrsz} +\n2$ for some $dfplqrsz$. First suppose we are in the following situation for\nsome $hjgrksla \\geq 2$. (Note: for us, a ``move'' consists of two turns,\nstarting with a one-penny pass.)\n\\begin{itemize}\n\\item\nExcept for the player to move, each player has $hjgrksla$ pennies;\n\\item\nThe player to move has at least $hjgrksla$ pennies.\n\\end{itemize}\nWe claim then that\nthe game terminates if and only if the number of players is a\npower of 2. First suppose the number of players is even; then after\n$dfplqrsz$ complete rounds, every other player, starting with the player who\nmoved first, will have $dfplqrsz$ more pennies than initially, and the others\nwill all have 0. Thus we are reduced to the situation with half as\nmany players; by this process, we eventually reduce to the case where\nthe number of players is odd. However, if there is more than one\nplayer, after two complete rounds everyone has as many pennies as they\ndid before (here we need $dfplqrsz \\geq 2$), so the game fails to terminate.\nThis verifies the claim.\n\nReturning to the original game, note that after one complete round,\n$\\lfloor \\frac{qzxwvtnp-1}{2} \\rfloor$ players remain, each with 2 pennies\nexcept for the player to move, who has\neither 3 or 4 pennies. Thus by the above argument, the game terminates\nif and only if $\\lfloor \\frac{qzxwvtnp-1}{2} \\rfloor$ is a power of 2, that\nis, if and only if $qzxwvtnp = 2^{dfplqrsz} + 1$ or $qzxwvtnp = 2^{dfplqrsz} + 2$ for some $dfplqrsz$. "
    },
    "kernel_variant": {
      "question": "Let $n\\ge 3$ be an integer and identify the vertices of a regular\n$n$–gon with the cyclic group  \n\\[\nC_{n}=\\mathbf Z/n\\mathbf Z\n      =\\{\\overline 0,\\overline 1,\\ldots ,\\overline{n-1}\\},\\qquad\n      \\overline j+\\overline k:=\\overline{\\,j+k\\,}.\n\\]\n\nEvery vertex $\\overline j\\in C_{n}$ is initially occupied by  \n\n\\hspace*{1.9em}$\\bullet$ one {\\em active contestant},\\qquad\n\\hspace*{1.9em}$\\bullet$ one identical {\\em jade gem}.  \n\nFix a vertex $A\\in C_{n}$; the contestant placed there is called the\n{\\em pointer}.  \nAs long as at least three contestants are still active the following  \n\n\\begin{center}\n{\\bf basic move}\n\\end{center}\n\nis executed.\n\n1.\\; {\\bf Choice of the acting triple.}\\;\n   Clockwise from the pointer take the first three {\\em distinct}\n   active contestants  \n   \\[\n      S_{0},\\;S_{1},\\;S_{2},\\qquad S_{0}=\\text{current pointer};\n   \\]\n\n2.\\; {\\bf Gem transfers.}\\;\n   $S_{0}$ gives {\\em one} gem to $S_{1}$; immediately afterwards\n   $S_{1}$ gives {\\em two} gems to $S_{2}$;\n\n3.\\; {\\bf Retirements.}\\;\n   Every contestant whose stock has just dropped to $0$ leaves the game\n   forever;\n\n4.\\; {\\bf Pointer update.}\\;\n   The new pointer is the {\\em first} active contestant met strictly\n   clockwise {\\em after} $S_{2}$.\n\nThe game stops automatically as soon as fewer than three contestants are\nactive.  \nIf, at that moment, exactly one contestant is still active we say that\nthe game {\\em terminates successfully}.\n\n(a)\\; For which integers $n\\ge 3$ does there exist {\\em at least one}\n    initial pointer $A$ for which the game terminates successfully?\n    For every such $n$ exhibit an explicit winning pointer.\n\n(b)\\; For which integers $n\\ge 3$ does the game terminate successfully\n    {\\em for every} choice of the initial pointer?",
      "solution": "Throughout write  \n\\[\nn=3k+r,\\qquad 0\\le r\\le 2,\\qquad k=\\Bigl\\lfloor\\frac n3\\Bigr\\rfloor .\n\\tag{1}\n\\]\n\nA contestant owning exactly one gem is called {\\em light}, otherwise\n{\\em heavy}.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1.\\;  An initial deterministic sweep\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nIndex the contestants clockwise by  \n\\[\nP_{0}:=\\text{pointer},\\;P_{1},\\ldots ,P_{n-1}.\n\\]\n\nBecause everybody is light, the first move acts on\n$(P_{0},P_{1},P_{2})$, eliminates $P_{0},P_{1}$ and turns $P_{2}$ into\na heavy with $3$ gems.  \nThe new pointer is $P_{3}$.  \nRepeating this argument $k$ times yields the\n\n\\medskip\\noindent\n{\\bf Canonical configuration}\n\n\\begin{enumerate}\n\\item[(i)] $H:=\\{P_{2},P_{5},\\ldots ,P_{3k-1}\\}$ consists of $k$\n           heavies, each of them owning $3$ gems;\n\\item[(ii)] if $r=2$ the two lights are $L_{0}:=P_{3k}$ (pointer) and\n            $L_{1}:=P_{3k+1}$, whereas for $r\\in\\{0,1\\}$ no light is\n            present;\n\\item[(iii)] the configuration obtained so far is uniquely determined\n             by $n$ and does {\\em not} depend on the original pointer.\n\\end{enumerate}\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n2.\\;  The residue $r=1$ – impossibility\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nAssume $r=1$, i.e.\\ $n=3k+1\\;(k\\ge 1)$.  \nThe single light $L:=P_{3k}$ is the pointer.  \nThe next move eliminates $L$ and leaves $k$ heavies, all owning at\nleast $2$ gems.  \n\n\\medskip\\noindent\n{\\bf Lemma 1.}\\;\nIf every active player owns at least $2$ gems, then {\\em exactly} two\nplayers retire in each subsequent move; consequently the number of\nactive contestants can never drop from $\\ge 3$ to $1$.\n\n\\smallskip\n{\\em Proof.}\\;\nLet $(S_{0},S_{1},S_{2})$ be the acting triple.\n$S_{2}$ gains two gems and therefore survives.\nA player retires precisely when he started the move with $1$ gem.\nIf $S_{0}$ retires, then $S_{1}$ has also lost one gem and could not\nhave owned more than $2$ before the move; hence $S_{1}$ retires as\nwell, and conversely.  \n\\hfill$\\square$\n\n\\medskip\nAfter the elimination of $L$ at least $k\\ge 1$ players are active.\nLemma~1 now forbids a successful termination, so\n\n\\[\n\\boxed{\\;r=1\\ \\Longrightarrow\\ \\text{no success is possible.}\\;}\n\\tag{2}\n\\]\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n3.\\;  Reduction to a heavy–only situation for $r\\in\\{0,2\\}$\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\\underline{$r=0$.}\\;\nThe canonical configuration is already heavy–only.\n\n\\smallskip\n\\underline{$r=2$.}\\;\nOnly the lights $L_{0}$ (pointer) and $L_{1}$ are not heavy.  \nThe unique legal move\n\\[\nS_{0}=L_{0},\\quad S_{1}=L_{1},\\quad S_{2}=P_{2}\n\\]\neliminates $L_{0},L_{1}$ and raises the stock of $P_{2}$ from $3$ to\n$5$ gems.  \n\n\\smallskip\nCombining both cases, the game has now reached a position with  \n\n\\[\nk\\ge 1\\quad\\text{active contestants }Q_{0},Q_{1},\\ldots ,Q_{k-1}\n\\ ( \\text{clockwise order}), \\qquad\ng(Q_{j})\\ge 3\\;(j\\ne 0),\\;g(Q_{0})\\in\\{3,5\\},\n\\tag{3}\n\\]\nwhere $Q_{0}$ is the pointer and the indices are taken modulo $k$.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n4.\\;  Dynamical decomposition into colour classes\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nSet \n\\[\nd:=\\gcd(3,k),\\qquad k=3d\\ell\\ ( \\ell\\ge 1).\n\\tag{4}\n\\]\n\nBecause in every move the pointer jumps {\\em three} steps clockwise,\nits index modulo $d$ never changes.\nHence the $k$ active contestants split into $d$ {\\em colour classes}\n\n\\[\nC_{s}:=\\{Q_{3t+s}\\mid 0\\le t\\le 3\\ell-1\\},\\qquad 0\\le s\\le d-1,\n\\]\neach of size $3\\ell$.  \n\nDuring one {\\em block} of $3\\ell$ consecutive moves every contestant\nappears once as starter, once as middle and once as receiver, whence\nhis net gem change in this block equals $-1-1+2=0$.  \nConsequently\n\n\\begin{quote}\n{\\em if $d=1$ no retirement is ever possible.}\n\\end{quote}\n\nIn view of Lemma~1 and (2) this leaves only\n\n\\[\nd=3\\quad\\Longleftrightarrow\\quad 3\\mid k\n\\tag{5}\n\\]\nas a candidate for a successful game.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n5.\\;  The critical case $d=3$\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nWrite $k=3\\ell$ and enumerate\n\\[\nC_{0}:=\\{Q_{3t}\\},\\quad\nC_{1}:=\\{Q_{3t+1}\\},\\quad\nC_{2}:=\\{Q_{3t+2}\\}\\quad(0\\le t\\le \\ell-1).\n\\]\n\n\\medskip\\noindent\n{\\bf Lemma 2.}\\;\nDuring one block of $\\ell$ consecutive moves the {\\em individual}\nchanges read  \n\\[\n\\Delta(C_{0})=-1,\\qquad \\Delta(C_{1})=-1,\\qquad \\Delta(C_{2})=+2 .\n\\tag{6}\n\\]\n\n\\smallskip\n{\\em Proof.}\\;\nWithin such a block every member of $C_{0}$ (resp.\\,$C_{1},C_{2}$) is\nstarter (resp.\\,middle, receiver) exactly once.\n\\hfill$\\square$\n\n\\bigskip\nRepeated application of (6) shows that the gem differences\n{\\em inside one colour class} never change.  \nDenote by\n\\[\nm:=\\min_{0\\le j\\le k-1} g(Q_{j})\n\\tag{7}\n\\]\nthe current minimal stock.\n\n\\medskip\\noindent\n{\\bf Lemma 3 (simultaneous disappearance of two colour classes).}\\;\nSuppose $m>0$ at some moment and let $B$ be the unique block during\nwhich $m$ becomes $0$.  \nThen at the {\\em end} of $B$ every member of $C_{0}\\cup C_{1}$ has\nretired, whereas all members of $C_{2}$ survive.\n\n\\smallskip\n{\\em Proof.}\\;\nBecause each contestant of $C_{0}\\cup C_{1}$ loses exactly one gem per\nblock, they all reach $0$ simultaneously in $B$.  \nEvery member of $C_{2}$ gains two gems in that same block, hence none\nof them can retire there.\n\\hfill$\\square$\n\n\\medskip\nAfter the block $B$ only the $\\ell$ contestants of $C_{2}$ remain.\nThey sit pairwise separated by two empty seats, but for the ongoing\nplay we may contract every arc of three consecutive positions into one\nsingle vertex.\nIn this {\\em contracted polygon} the survivors are consecutive, the\npointer is still $Q_{0}$, and the rules of the game are unchanged.\nTherefore the whole situation has reproduced itself with  \n\n\\[\nk\\;\\longleftarrow\\;\\ell=\\frac k3 ,\n\\qquad\\text{while all survivors possess at least }3\\text{ gems.}\n\\tag{8}\n\\]\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n6.\\;  Final classification\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nIterating the contraction (8) we obtain a non–increasing sequence  \n\n\\[\nk_{0}:=k,\\qquad\nk_{j+1}:=\\begin{cases}\n\\dfrac{k_{j}}3,& 3\\mid k_{j},\\\\[6pt]\nk_{j},& 3\\nmid k_{j},\n\\end{cases}\n\\tag{9}\n\\]\nwhich stabilises at some $k_{\\infty}\\in\\{1,2\\}$.\n\n\\medskip\\noindent\n{\\bf Lemma 4.}\\;\n$k_{\\infty}=1$ if and only if $k$ is a power of $3$.\n\n\\smallskip\n{\\em Proof.}\\;\nIf $k=3^{m}$, then $k_{j}=3^{m-j}$ until $j=m$, whence\n$k_{\\infty}=1$.  \nConversely, if $k_{\\infty}=1$, every division in (9) is exact; thus\n$k=3^{m}$.\n\\hfill$\\square$\n\n\\bigskip\n{\\em (i)  $k_{\\infty}=2$.}\\;\nAfter the last contraction two contestants remain, so the game has\nalready stopped {\\em unsuccessfully}.\n\n\\smallskip\n{\\em (ii) $k_{\\infty}=1$.}\\;\nAt the last stage $k=1$, hence exactly one contestant is active and\nthe game terminates {\\em successfully}.\n\n\\medskip\nCollecting (2), (5) and Lemma~4 we have shown that\n\n\\[\n\\boxed{\\;\n\\begin{aligned}\n\\text{a successful termination is \\emph{possible}}\\;\\Longleftrightarrow\\;&\nr\\in\\{0,2\\}\\ \\text{and}\\ k=3^{m}\\ (m\\ge 0).\n\\end{aligned}}\n\\tag{10}\n\\]\n\nBecause $n=3k+r$, condition (10) amounts to\n\n\\[\n\\boxed{\\;\nn\\in\\{\\,3^{m},\\,3^{m}+2\\mid m\\ge 0\\}.\n\\;}\n\\tag{11}\n\\]\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n7.\\;  Winning and universal pointers\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n(a)\\; {\\bf Existence.}\\;\nFor every $n$ listed in (11) choose the initial pointer $A$ so that,\nafter the deterministic sweep of Section~1, the contestant with\npossibly $5$ gems belongs to the {\\em receiver} class $C_{2}$\n(this is always possible by a rotation of all indices).\nWith that choice the proof above shows that the game ends in a single\nsurvivor.  \n\nExplicitly, if $n=3^{m}+2$ write $n=3k+2$ with $k=3^{m-1}$ ($m\\ge 1$)\nand take  \n\\[\nA=\\overline{\\,3k+1\\,};\n\\qquad\n\\text{for }n=5\\;(m=0)\\text{ take }A=\\overline 0.\n\\]\n\n(b)\\; {\\bf Universality.}\\;\nIf $n=3^{m}$ ($r=0$ and $k=3^{m-1}$) then {\\em every} initial pointer\nyields the same heavy–only configuration (all heavies possess $3$\ngems), so the preceding argument works verbatim; hence the game\nterminates successfully {\\em for every} choice of the pointer.\n\nIf $n=3^{m}+2$ ($m\\ge 0$) the pointer chosen in (a) is winning, but\nplacing the pointer two steps clockwise produces a heavy with $5$\ngems inside the starter class $C_{0}$; in that case the first\ncontraction already leaves two survivors, so the game fails.\nThus successful termination is {\\em not} universal.\n\n\\[\n\\boxed{\\;\n\\begin{aligned}\n&\\text{Successful for \\emph{every} pointer } \\Longleftrightarrow\n      n=3^{m}\\;(m\\ge 0),\\\\\n&\\text{Successful for \\emph{some}   pointer } \\Longleftrightarrow\n      n=3^{m}\\ \\text{or}\\ n=3^{m}+2\\;(m\\ge 0).\n\\end{aligned}}\n\\]\n\n\\hfill$\\square$",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.750349",
        "was_fixed": false,
        "difficulty_analysis": "• The original problem dealt with one fixed ordering of the players.\n  The enhanced variant allows an *arbitrary* step size r coprime to n,\n  so the effective order of play can be any of the φr–orbits of the\n  cyclic group.  One must therefore recognise and exploit an abstract\n  group isomorphism to reduce the general situation to a single model\n  case.  This demands comfort with cyclic groups and permutation\n  conjugacy – concepts absent from the original statement.\n\n• Besides total‐gem conservation (the only invariant used in the\n  current kernel) we introduced and had to track a subtler invariant,\n  the alternating sum modulo 3, to rule out spurious possibilities.\n  Proving and using such a congruence invariant is a level of\n  sophistication not needed in the easier setting.\n\n• The solution requires blending three techniques:\n  (i)  a relabelling argument using group theory,\n  (ii) a round-wise induction reducing n via a non-trivial recursive\n       formula, and\n  (iii) an invariant-based impossibility proof.\n  The original problem needs only (ii); the current kernel variant\n  uses essentially (ii) with light congruence folklore, whereas the\n  enhanced version forces the solver to coordinate all three strands.\n\n• Conceptually, the solver must see through the apparent additional\n  freedom (the parameter r) and prove that it *does not* enlarge the\n  set of solvable n – a non-obvious assertion that sharply raises the\n  cognitive load compared with merely finding one infinite family."
      }
    },
    "original_kernel_variant": {
      "question": "Let $n\\ge 3$ be an integer and set  \n\n\\[\nC_{n}= \\mathbf Z / n\\mathbf Z\n      =\\{\\overline 0,\\overline 1,\\dots ,\\overline{n-1}\\},\n      \\qquad\n      \\overline j+\\overline k:=\\overline{\\,j+k\\,}.\n\\]\n\nEvery vertex $\\overline j\\in C_{n}$ of the regular $n$–gon is occupied by  \n\n\\hspace*{1.6em}$\\bullet$ one {\\it active contestant},  \n\n\\hspace*{1.6em}$\\bullet$ one identical {\\it jade gem}.  \n\nChoose one vertex $A\\in C_{n}$; the contestant stationed there is called the\n{\\it pointer}.\nWhile at least three contestants remain active the\nfollowing\n\n\\begin{center}\n{\\bf basic move}\n\\end{center}\nis executed.\n\n1.\\quad {\\it Choice of the acting triple.}  \n   Starting with the pointer and moving clockwise, take the first three\n   {\\it distinct} active contestants  \n\n   \\[\n        S_{0},\\;S_{1},\\;S_{2},\\qquad S_{0}= \\text{ current pointer};\n   \\]\n\n2.\\quad {\\it Gem transfers.}  \n\n   $S_{0}$ gives {\\it one} gem to $S_{1}$; immediately afterwards\n   $S_{1}$ gives {\\it two} gems to $S_{2}$;\n\n3.\\quad {\\it Retirements.}  \n\n   Every contestant whose stock has just fallen to $0$ gems leaves the\n   game for good;\n\n4.\\quad {\\it Pointer update.}  \n\n   The new pointer is the {\\it first} active contestant met strictly\n   clockwise {\\em after} $S_{2}$.\\smallskip\n\nThe game stops automatically as soon as fewer than three contestants are\nactive.  \nIf exactly {\\it one} contestant is still active at that moment we say\nthat the game {\\it terminates successfully}.\n\n(a)\\; For which integers $n\\ge 3$ does there exist\n    {\\em at least one} initial pointer $A$ for which the game\n    terminates successfully?\n    For every such $n$ exhibit an explicit winning pointer.\n\n(b)\\; For which integers $n\\ge 3$ does the game terminate successfully\n    {\\em for every} choice of the initial pointer?\n\n\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "solution": "Throughout we write  \n\n\\[\nn=3k+r,\\qquad 0\\le r\\le 2 ,\\qquad k=\\bigl\\lfloor\\tfrac n3\\bigr\\rfloor ,\n\\]\nand call a contestant  \n\n\\[\n\\textit{light}\\;:\\;1\\text{ gem},\\qquad\n\\textit{heavy}\\;:\\;\\ge 2\\text{ gems}.\n\\]\nAll gem numbers are non–negative integers.\n\n\n\n------------------------------------------------------------------\n1.\\;  A deterministic first sweep\n------------------------------------------------------------------\n\nFix the clockwise enumeration  \n\n\\[\n\\boxed{P_{0}:=\\text{initial pointer},\\;P_{1},\\dots ,P_{n-1}}\n\\tag{1.1}\n\\]\n\nof the vertices.  \nBecause initially every contestant is light, the first move involves the\ntriple $(P_{0},P_{1},P_{2})$; both $P_{0}$ and $P_{1}$ retire,\nwhereas $P_{2}$ turns heavy with $3$ gems and the pointer jumps to\n$P_{3}$.  \nRepeating the same reasoning $k$ times we arrive at\n\n\\smallskip\n{\\bf Claim 1.}  \nAfter exactly $k$ basic moves the position is\n\n\\begin{itemize}\n\\item[(a)] the $2k$ contestants  \n\n      \\[\n      P_{0},P_{1},P_{3},P_{4},\\dots ,P_{3k-3},P_{3k-2}\n      \\]\n\n      have retired;\n\n\\item[(b)] the $k$ vertices  \n\n      \\[\n      H:=\\{P_{2},P_{5},\\dots ,P_{3k-1}\\}\n      \\]\n\n      survive, each with {\\it exactly $3$ gems};\n\n\\item[(c)] the lights and the pointer are\n\n\\[\n\\begin{array}{rcl}\nr=0 &:& \\text{no light, pointer }=P_{2};\\\\[2pt]\nr=1 &:& \\text{one light }L:=P_{3k},\\;\\text{pointer }=L;\\\\[2pt]\nr=2 &:& \\text{two consecutive lights }L_{1}:=P_{3k},\\,L_{2}:=P_{3k+1},\n          \\text{ pointer }=L_{1}.\n\\end{array}\n\\]\n\\end{itemize}\n\n\n\n------------------------------------------------------------------\n2.\\;  A monotone alternating–sum invariant\n------------------------------------------------------------------\n\nWhenever {\\it all} active contestants are heavy\nwe label them clockwise  \n\n\\[\nQ_{0},Q_{1},\\dots ,Q_{m-1}\\qquad (m\\ge 2),\n\\]\n\nchoosing the current pointer to be $Q_{0}$.  \nDefine the alternating sum  \n\n\\[\n\\Lambda=\\sum_{j=0}^{m-1} (-1)^{j}\\,g(Q_{j}),\n\\tag{2.1}\n\\]\n\nwhere $g(Q_{j})$ denotes the number of gems presently owned by $Q_{j}$.\n\n\\medskip\\noindent\n{\\bf Lemma 2.1 (strict drift of $\\Lambda$).}\nWhile only heavies are active one has {\\it at every move}\n\n\\[\n\\Delta\\Lambda = +2 .\n\\]\n\n\\emph{Proof.}\nLet $S_{0}=Q_{0},\\;S_{1}=Q_{1},\\;S_{2}=Q_{2}$ be the acting triple and\nwrite\n\n\\[\ng(Q_{0})=x,\\quad g(Q_{1})=y,\\quad g(Q_{2})=z\\qquad (x,y,z\\ge 2).\n\\]\n\nDuring the move the three stocks change by  \n\n\\[\n(x,y,z)\\longmapsto(x-1,\\;y-1,\\;z+2).\n\\]\n\nHence\n\n\\[\n\\Delta\\Lambda\n= (+1)\\cdot(-1)+(-1)\\cdot(-1)+(+1)\\cdot(+2)=+2 .\n\\tag{2.2}\n\\]\n\nAfter the transfers the pointer becomes $Q_{3}$, so every index is\nreduced by $3$.  \nBecause $(-1)^{j-3}=(-1)^{j}$ the signs in\n\\eqref{2.1} stay unchanged; therefore\n\\eqref{2.2} already gives the {\\it total} increment of $\\Lambda$ for\none full move.  \\hfill$\\square$\n\n\\smallskip\nConsequently $\\Lambda$ increases by the fixed amount $2$ every turn but\nis certainly bounded above by the total number of gems:\n\n\\[\n\\Lambda\\le n.\n\\tag{2.3}\n\\]\n\nTherefore {\\it a heavy–only position cannot persist for ever}; after at\nmost $\\lceil n/2\\rceil$ further moves at least one active contestant\nmust have dropped to $1$ gem, i.e. a light is created.\n\n\n\n------------------------------------------------------------------\n3.\\;  Reduction by two contestants\n------------------------------------------------------------------\n\nAssume that a light is present and denote by $T_{0},T_{1},T_{2}$ the\nthree residue classes modulo $3$ with respect to the current pointer\n(index $0$).  \nIn every move the changes in those three classes are\n\n\\[\nT_{0}:\\, -1,\\qquad T_{1}:\\, -1,\\qquad T_{2}:\\, +2 .\n\\tag{3.1}\n\\]\n\nHence lights can occur only in $T_{0}$ or $T_{1}$.\nTwo different situations have to be distinguished.\n\n\\smallskip\n{\\bf (i) A light belongs to $T_{0}$ (the pointer).}  \nIt passes its sole gem and retires immediately; the\nmiddle player $S_{1}\\in T_{1}$ decreases her stock by $1$ as well and\ntherefore becomes {\\it light}.  \nThus the number of actives has decreased by {\\it exactly two}.\nIf at that moment at least three contestants remain, we are again in\nthe setting of (i) or (ii) below.\n\n\\smallskip\n{\\bf (ii) A light belongs to $T_{1}$.}\nDuring the move it first receives a gem (becoming heavy) and then has\nto pay two gems, so it retires, while the starter in $T_{0}$ loses one\ngem and turns light.\nAgain we have eliminated precisely two contestants and are back to (i).\n\n\\smallskip\nIn either case a light triggers the simultaneous retirement of\n{\\it two} consecutive players and afterwards the play continues with an\n{\\it odd} number of active contestants (because an even number has just\nbeen removed).\n\n\n\n------------------------------------------------------------------\n4.\\;  Even versus odd number of heavies\n------------------------------------------------------------------\n\n\\smallskip\n{\\bf Lemma 4.1 (even number of heavies – impossibility).}\nIf all active contestants are heavy and their number $m$ is {\\it even},\nthen the game can never terminate successfully.\n\n\\emph{Proof.}\nLabel the heavies as in Section 2 and mark\n$Q_{0},Q_{2},\\dots ,Q_{m-2}$.  \nEach move alters the numbers of marked and unmarked gems\nrespectively by $(-1)+2=+1$ and $-1$ (if the starter is marked) or the\nopposite (if he is unmarked), so the difference\n$\\Gamma=$(marked gems)$-$(unmarked gems) always changes by $\\pm2$.\nBecause $m$ is even, the parity of the starter alternates, whence\n$\\lvert\\Gamma\\rvert$ stays bounded by $n/2+1<n$ for $n\\ge 6$.  \nA lone winner, however, would give $\\lvert\\Gamma\\rvert=n$, a\ncontradiction.  (For $m=2$ a new move is already impossible.)\n\\hfill$\\square$\n\n\\smallskip\n{\\bf Lemma 4.2 (odd number of heavies – convergence).}\nSuppose that at some moment all active contestants are heavy and their\nnumber $m$ is {\\it odd}.  \nThen, independently of the current pointer, the play terminates\nsuccessfully after finitely many further moves.\n\n\\emph{Proof.}\nBy Lemma 2.1 the alternating sum $\\Lambda$ rises by $2$ each turn until\na light appears, which must happen before $\\Lambda$ exceeds $n$.\nLemma 4.1 implies $m\\ge 3$; hence when the first light is formed\nSection 3 eliminates two active players and leaves an {\\it odd} number\n$m-2$ of heavies.  \nInduction on odd $m$ completes the proof; the induction step does not\nuse any property of the pointer, so the conclusion is pointer–independent.\n\\hfill$\\square$\n\n\n\n------------------------------------------------------------------\n5.\\;  The three residue classes of $n$\n------------------------------------------------------------------\n\n(a)\\; $r=1$ ($n=3k+1$).  \nClaim 1 produces $k$ heavies and one light $L$ with the pointer sitting\nat $L$.  \nWe are in case 3(i): the very next move eliminates $L$ and {\\it one}\nheavy, leaving an {\\it even} number $k-1$ of heavies.\nLemma 4.1 then forbids a single winner – hence no pointer wins if\n$n\\equiv1\\pmod3$.\n\n\\smallskip\n(b)\\; $r=0$ ($n=3k$).  \nAfter the first sweep only the $k$ heavies in $H$ survive.\n\n\\hspace*{1.8em}$\\bullet$ If $k$ is even ($n\\equiv0\\pmod6$) Lemma 4.1\nexcludes success.\n\n\\hspace*{1.8em}$\\bullet$ If $k$ is odd ($n\\equiv3\\pmod6$) Lemma 4.2\nyields termination and, thanks to pointer–independence, every pointer\nis winning.\n\n\\smallskip\n(c)\\; $r=2$ ($n=3k+2$).  \nClaim 1 leaves $k$ heavies ($k\\ge1$) and two lights\n$L_{1},L_{2}$ with the pointer at $L_{1}$.\nOne additional move (case 3(i)) eliminates both lights,\ncreates an extra $2$ gems on $P_{2}$ and places the pointer on $P_{5}$.\nHence we again have $k$ heavies.\n\n\\hspace*{1.8em}$\\bullet$ If $k$ is even ($n\\equiv2\\pmod6$) Lemma 4.1\nrules out success.\n\n\\hspace*{1.8em}$\\bullet$ If $k$ is odd ($n\\equiv5\\pmod6$) Lemma 4.2\napplies, so the game ends successfully, and it does so independently of\nthe initial pointer.\n\n\\smallskip\nCombining (a), (b) and (c) we obtain\n\n\\[\n\\boxed{\n\\begin{aligned}\n\\text{(a) There exists a winning pointer } &\\Longleftrightarrow\n& n\\equiv 3,\\,5 \\pmod 6;\\\\[4pt]\n\\text{(b) Every pointer is winning } &\\Longleftrightarrow\n& n\\equiv 3,\\,5 \\pmod 6 .\n\\end{aligned}}\n\\]\n\nIf $n\\equiv3 \\pmod6$ the victory is pointer–independent because the game\nreaches a heavy–only configuration with an odd number of contestants.\nFor $n\\equiv5\\pmod6$ (including $n=5$) exactly one preparatory move is\nrequired before that same situation is attained, so again {\\it every}\ninitial pointer is winning.\n\n\\medskip\n{\\bf Small cases $n=3,4,5$.}\n\n\\[\n\\begin{array}{lcl}\nn=3: &\\text{Exactly one basic move is possible and leaves a lone\n      survivor.}&(\\text{all pointers win})\\\\[2pt]\nn=4: &\\text{The only move leaves two active contestants.}\n      &(\\text{termination impossible})\\\\[2pt]\nn=5: &\\text{Two moves remove four players and heap all\n      gems on the fifth.}&(\\text{all pointers win})\n\\end{array}\n\\]\n\nThese special values fit the boxed classification.\n\n\n\n\\bigskip\nThis completes the corrected solution.\n\n\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.579040",
        "was_fixed": false,
        "difficulty_analysis": "• The original problem dealt with one fixed ordering of the players.\n  The enhanced variant allows an *arbitrary* step size r coprime to n,\n  so the effective order of play can be any of the φr–orbits of the\n  cyclic group.  One must therefore recognise and exploit an abstract\n  group isomorphism to reduce the general situation to a single model\n  case.  This demands comfort with cyclic groups and permutation\n  conjugacy – concepts absent from the original statement.\n\n• Besides total‐gem conservation (the only invariant used in the\n  current kernel) we introduced and had to track a subtler invariant,\n  the alternating sum modulo 3, to rule out spurious possibilities.\n  Proving and using such a congruence invariant is a level of\n  sophistication not needed in the easier setting.\n\n• The solution requires blending three techniques:\n  (i)  a relabelling argument using group theory,\n  (ii) a round-wise induction reducing n via a non-trivial recursive\n       formula, and\n  (iii) an invariant-based impossibility proof.\n  The original problem needs only (ii); the current kernel variant\n  uses essentially (ii) with light congruence folklore, whereas the\n  enhanced version forces the solver to coordinate all three strands.\n\n• Conceptually, the solver must see through the apparent additional\n  freedom (the parameter r) and prove that it *does not* enlarge the\n  set of solvable n – a non-obvious assertion that sharply raises the\n  cognitive load compared with merely finding one infinite family."
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}