{
  "index": "1967-B-4",
  "type": "NT",
  "tag": [
    "NT",
    "COMB"
  ],
  "difficulty": "",
  "question": "B-4. (a) A certain locker room contains \\( n \\) lockers numbered \\( 1,2,3, \\cdots, n \\) and all are originally locked. An attendant performs a sequence of operations \\( T_{1}, T_{2}, \\cdots, T_{n} \\) whereby with the operation \\( T_{k}, 1 \\leqq k \\leqq n \\), the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of \\( k \\). After all the \\( n \\) operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically.\n(b) Investigate in a meaningful mathematical way a procedure or set of operations similar to those above which will produce the set of cubes, or the set of numbers of the form \\( 2 \\mathrm{~m}^{2} \\), or the set of numbers of the form \\( m^{2}+1 \\), or some nontrivial similar set of your own selection.",
  "solution": "B-4 Locker \\( m, 1 \\leqq m \\leqq n \\), will be unlocked after the \\( n \\) operations are performed if and only if \\( m \\) has an odd number of positive divisors. If \\( m=p^{\\alpha} q^{\\beta} \\) \\( \\cdots r^{\\gamma} \\), then the number of divisors of \\( m \\) is \\( (\\alpha+1)(\\beta+1) \\cdots(\\gamma+1) \\), which is odd if and only if \\( \\alpha, \\beta, \\cdots, \\gamma \\) are all even. This is equivalent to the condition that \\( m \\) is a perfect square.\n\nFor part (b), the set of numbers of the form \\( 2 m^{2} \\) are obtained by having \\( T_{k} \\) change lockers whose numbers are multiples of \\( 2 k \\). The set \\( m^{2}+1 \\) results from \\( T_{k} \\) changing locker \\( i \\) if \\( i-1 \\) is a multiple of \\( k \\), with the stipulation that locker number 1 is changed only by \\( T_{1} \\).",
  "vars": [
    "k",
    "m",
    "i"
  ],
  "params": [
    "n",
    "T_k",
    "p",
    "q",
    "r",
    "\\\\alpha",
    "\\\\beta",
    "\\\\gamma"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "k": "divisor",
        "m": "locker",
        "i": "indexer",
        "n": "totalnum",
        "T_k": "opstage",
        "p": "primeone",
        "q": "primetwo",
        "r": "primethree",
        "\\\\alpha": "expalpha",
        "\\\\beta": "expbeta",
        "\\\\gamma": "expgamma"
      },
      "question": "B-4. (a) A certain locker room contains \\( totalnum \\) lockers numbered \\( 1,2,3, \\cdots, totalnum \\) and all are originally locked. An attendant performs a sequence of operations \\( T_{1}, T_{2}, \\cdots, T_{totalnum} \\) whereby with the operation \\( opstage, 1 \\leqq divisor \\leqq totalnum \\), the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of \\( divisor \\). After all the \\( totalnum \\) operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically.\n(b) Investigate in a meaningful mathematical way a procedure or set of operations similar to those above which will produce the set of cubes, or the set of numbers of the form \\( 2 \\mathrm{~locker}^{2} \\), or the set of numbers of the form \\( locker^{2}+1 \\), or some nontrivial similar set of your own selection.",
      "solution": "B-4 Locker \\( locker, 1 \\leqq locker \\leqq totalnum \\), will be unlocked after the \\( totalnum \\) operations are performed if and only if \\( locker \\) has an odd number of positive divisors. If \\( locker=primeone^{expalpha} primetwo^{expbeta} \\cdots primethree^{expgamma} \\), then the number of divisors of \\( locker \\) is \\( (expalpha+1)(expbeta+1) \\cdots(expgamma+1) \\), which is odd if and only if \\( expalpha, expbeta, \\cdots, expgamma \\) are all even. This is equivalent to the condition that \\( locker \\) is a perfect square.\n\nFor part (b), the set of numbers of the form \\( 2 locker^{2} \\) are obtained by having \\( opstage \\) change lockers whose numbers are multiples of \\( 2 divisor \\). The set \\( locker^{2}+1 \\) results from \\( opstage \\) changing locker \\( indexer \\) if \\( indexer-1 \\) is a multiple of \\( divisor \\), with the stipulation that locker number 1 is changed only by \\( T_{1} \\)."
    },
    "descriptive_long_confusing": {
      "map": {
        "k": "giraffetale",
        "m": "cobblestone",
        "i": "buttercup",
        "n": "planetarium",
        "T_k": "carousel",
        "p": "rainshadow",
        "q": "ventilator",
        "r": "montgomery",
        "\\alpha": "huntsman",
        "\\beta": "pendleton",
        "\\gamma": "windchimes"
      },
      "question": "B-4. (a) A certain locker room contains \\( planetarium \\) lockers numbered \\( 1,2,3, \\cdots, planetarium \\) and all are originally locked. An attendant performs a sequence of operations \\( T_{1}, T_{2}, \\cdots, T_{planetarium} \\) whereby with the operation \\( T_{giraffetale}, 1 \\leqq giraffetale \\leqq planetarium \\), the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of \\( giraffetale \\). After all the \\( planetarium \\) operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically.\n(b) Investigate in a meaningful mathematical way a procedure or set of operations similar to those above which will produce the set of cubes, or the set of numbers of the form \\( 2 \\mathrm{~cobblestone}^{2} \\), or the set of numbers of the form \\( cobblestone^{2}+1 \\), or some nontrivial similar set of your own selection.",
      "solution": "B-4 Locker \\( cobblestone, 1 \\leqq cobblestone \\leqq planetarium \\), will be unlocked after the \\( planetarium \\) operations are performed if and only if \\( cobblestone \\) has an odd number of positive divisors. If \\( cobblestone=rainshadow^{huntsman} ventilator^{pendleton} \\) \\( \\cdots montgomery^{windchimes} \\), then the number of divisors of \\( cobblestone \\) is \\( (huntsman+1)(pendleton+1) \\cdots(windchimes+1) \\), which is odd if and only if \\( huntsman, pendleton, \\cdots, windchimes \\) are all even. This is equivalent to the condition that \\( cobblestone \\) is a perfect square.\n\nFor part (b), the set of numbers of the form \\( 2 cobblestone^{2} \\) are obtained by having \\( T_{giraffetale} \\) change lockers whose numbers are multiples of \\( 2 giraffetale \\). The set \\( cobblestone^{2}+1 \\) results from \\( T_{giraffetale} \\) changing locker \\( buttercup \\) if \\( buttercup-1 \\) is a multiple of \\( giraffetale \\), with the stipulation that locker number 1 is changed only by \\( T_{1} \\)."
    },
    "descriptive_long_misleading": {
      "map": {
        "k": "stagnantval",
        "m": "fixedvalue",
        "i": "nonindexer",
        "n": "boundless",
        "T_k": "stalloperator",
        "p": "antipoint",
        "q": "sureanswer",
        "r": "circleroot",
        "\\alpha": "omegaindex",
        "\\beta": "zetavalue",
        "\\gamma": "murelative"
      },
      "question": "B-4. (a) A certain locker room contains \\( boundless \\) lockers numbered \\( 1,2,3, \\cdots, boundless \\) and all are originally locked. An attendant performs a sequence of operations \\( T_{1}, T_{2}, \\cdots, T_{boundless} \\) whereby with the operation \\( stalloperator, 1 \\leqq stagnantval \\leqq boundless \\), the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of \\( stagnantval \\). After all the \\( boundless \\) operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically.\n(b) Investigate in a meaningful mathematical way a procedure or set of operations similar to those above which will produce the set of cubes, or the set of numbers of the form \\( 2 \\mathrm{~fixedvalue}^{2} \\), or the set of numbers of the form \\( fixedvalue^{2}+1 \\), or some nontrivial similar set of your own selection.",
      "solution": "B-4 Locker \\( fixedvalue, 1 \\leqq fixedvalue \\leqq boundless \\), will be unlocked after the \\( boundless \\) operations are performed if and only if \\( fixedvalue \\) has an odd number of positive divisors. If \\( fixedvalue=antipoint^{omegaindex} sureanswer^{zetavalue} \\cdots circleroot^{murelative} \\), then the number of divisors of \\( fixedvalue \\) is \\( (omegaindex+1)(zetavalue+1) \\cdots(murelative+1) \\), which is odd if and only if \\( omegaindex, zetavalue, \\cdots, murelative \\) are all even. This is equivalent to the condition that \\( fixedvalue \\) is a perfect square.\n\nFor part (b), the set of numbers of the form \\( 2 fixedvalue^{2} \\) are obtained by having \\( stalloperator \\) change lockers whose numbers are multiples of \\( 2 stagnantval \\). The set \\( fixedvalue^{2}+1 \\) results from \\( stalloperator \\) changing locker \\( nonindexer \\) if \\( nonindexer-1 \\) is a multiple of \\( stagnantval \\), with the stipulation that locker number 1 is changed only by \\( stalloperator \\)."
    },
    "garbled_string": {
      "map": {
        "k": "qzxwvtnp",
        "m": "hjgrksla",
        "i": "fvdplmok",
        "n": "xycbrdse",
        "T_k": "zxrplqnv",
        "p": "lksjdfwe",
        "q": "mvncbtua",
        "r": "pdosierw",
        "\\alpha": "ghtyewop",
        "\\beta": "cnvksjwe",
        "\\gamma": "weriouyx"
      },
      "question": "B-4. (a) A certain locker room contains \\( xycbrdse \\) lockers numbered \\( 1,2,3, \\cdots, xycbrdse \\) and all are originally locked. An attendant performs a sequence of operations \\( zxrplqnv_{1}, zxrplqnv_{2}, \\cdots, zxrplqnv_{xycbrdse} \\) whereby with the operation \\( zxrplqnv_{qzxwvtnp}, 1 \\leqq qzxwvtnp \\leqq xycbrdse \\), the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of \\( qzxwvtnp \\). After all the \\( xycbrdse \\) operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically.\n(b) Investigate in a meaningful mathematical way a procedure or set of operations similar to those above which will produce the set of cubes, or the set of numbers of the form \\( 2 \\mathrm{~hjgrksla}^{2} \\), or the set of numbers of the form \\( hjgrksla^{2}+1 \\), or some nontrivial similar set of your own selection.",
      "solution": "B-4 Locker \\( hjgrksla, 1 \\leqq hjgrksla \\leqq xycbrdse \\), will be unlocked after the \\( xycbrdse \\) operations are performed if and only if \\( hjgrksla \\) has an odd number of positive divisors. If \\( hjgrksla=lksjdfwe^{ghtyewop} mvncbtua^{cnvksjwe} \\) \\( \\cdots pdosierw^{weriouyx} \\), then the number of divisors of \\( hjgrksla \\) is \\( (ghtyewop+1)(cnvksjwe+1) \\cdots(weriouyx+1) \\), which is odd if and only if \\( ghtyewop, cnvksjwe, \\cdots, weriouyx \\) are all even. This is equivalent to the condition that \\( hjgrksla \\) is a perfect square.\n\nFor part (b), the set of numbers of the form \\( 2 hjgrksla^{2} \\) are obtained by having \\( zxrplqnv_{qzxwvtnp} \\) change lockers whose numbers are multiples of \\( 2 qzxwvtnp \\). The set \\( hjgrksla^{2}+1 \\) results from \\( zxrplqnv_{qzxwvtnp} \\) changing locker \\( fvdplmok \\) if \\( fvdplmok-1 \\) is a multiple of \\( qzxwvtnp \\), with the stipulation that locker number 1 is changed only by \\( zxrplqnv_{1} \\)."
    },
    "kernel_variant": {
      "question": "Let L(≥1) be a fixed positive integer. On a table lie L two–sided medallions numbered 1,2,…,L, each of them initially showing its onyx face. For every index k=1,2,…,L the attendant must carry out exactly one of the following two operations.\n\n(I)   Fix once and for all a positive integer a.  In an operation of type (I) carried out at step k the attendant flips every medallion whose number is a multiple of a·k.\n\n(II)  Choose an integer r_k with 0≤r_k<k.  In an operation of type (II) carried out at step k the attendant flips every medallion whose number is congruent to r_k (mod k).\n\nAn individual medallion finishes jade-side up precisely when it has been flipped an odd number of times.\n\na)   Suppose that every operation is of type (I) with the fixed multiplier a=1 (so that the k-th step flips exactly those medallions whose numbers are multiples of k).  After all L steps have been executed determine exactly which medallions show jade and justify your answer.\n\nb)   Construct and justify two further concrete families of operations (𝒯₁,…,𝒯_L) and (𝒰₁,…,𝒰_L) that still respect all the structural rules above, and that leave jade showing precisely on the medallions numbered by\n\n   (i)  the perfect cubes, and\n   (ii) the integers of the form 3t²  (t∈ℕ),\n\nrespectively.  In the family (𝒰₁,…,𝒰_L) every single step must be of type (I) with one and the same multiplier a;  in the family (𝒯₁,…,𝒯_L) each step may be of type (I) or of type (II).",
      "solution": "Throughout we count parity, i.e. we work in the two–element field 𝔽₂.  For a set E⊂{1,…,L} let χ_E(m)=1 if m∈E and 0 otherwise; all additions and multiplications take place in 𝔽₂.\n\n────────────────────────────────\n(a)  (The classical locker–room problem)\n\nWith the multiplier a=1 the k-th step flips exactly the medallions whose\nnumbers are multiples of k.  A medallion numbered m is therefore flipped once\nfor every positive divisor of m, i.e.\n            (# of flips received by m)=d(m),\nwhere, for the prime factorisation m=∏p_i^{e_i},\n            d(m)=∏(e_i+1).\nA product of integers is odd exactly when each factor is odd; this happens\nprecisely when every exponent e_i is even, i.e. when m is a perfect square.\nHence after the whole procedure the jade faces are showing precisely on the\nmedallions whose numbers are perfect squares.\n\n────────────────────────────────\n(b-ii)  Producing the numbers 3t²  (all steps of type (I))\n\nFix the multiplier a=3 and set, for every k=1,…,L,\n            𝒰_k : “flip every medallion whose number is a multiple of 3k”.\n\nA medallion m is flipped by 𝒰_k exactly when 3k|m.  Consequently it is flipped\n\n            F(m)= { d(m⁄3)   if 3|m,\n                     0        if 3∤m.\n\nIf 3∤m the medallion is never touched.  If 3|m write m=3n; then F(m)=d(n), and,\nby part (a), d(n) is odd precisely when n is a perfect square.  Hence F(m) is\nodd  ⇔  m=3t² for some t∈ℕ, exactly as required.\n\n────────────────────────────────\n(b-i)  Producing the perfect cubes  (mix of type (I) and type (II))\n\nWe construct **exactly L operations**, indexed 1,…,L, of which some are of type\n(I) and the rest of type (II).  All type-(I) steps use **one and the same**\nmultiplier\n            A := L+1 > L,                                           (3)\nso that a type-(I) step flips *no* medallion at all (because every multiple of\nA·k exceeds L).  Type-(I) steps therefore serve as harmless “place-holders”.\n\nLet\n            C(m) = 1  if m is a perfect cube (≤L),\n                 = 0  otherwise.                                   (4)\nFor every k≤L define\n            τ(k) = Σ_{d|k} C(d)·μ(k/d)   (mod 2),                  (5)\nwhere μ is the classical Möbius function (taken modulo 2).  Möbius inversion\nimmediately yields\n            Σ_{k|m} τ(k)  =  C(m)     (mod 2)   for every m≤L.      (6)\n\nWe now prescribe the family (𝒯₁,…,𝒯_L).\n\nStep k (1≤k≤L):\n      •  if τ(k)=1 choose type (II) with        r_k = 0;\n      •  if τ(k)=0 choose type (I) with multiplier A from (3).\n\nBecause r_k=0 satisfies 0≤r_k<k, every step is legitimate and the multiplier A\nis indeed fixed “once and for all”.  Denote by 𝒯_k the operation chosen for\nindex k.\n\nParity analysis.  A medallion numbered m is flipped by 𝒯_k exactly when k|m and\nτ(k)=1, because the type-(I) steps never touch any medallion.  Hence the total\nnumber of flips received by m is\n            Σ_{k|m} τ(k)    (mod 2),\nwhich equals C(m) by (6).  Therefore m is flipped an odd number of times ⇔\nC(m)=1 ⇔ m is a perfect cube.\n\nConsequently the family (𝒯₁,…,𝒯_L) leaves jade showing **precisely** on the\nmedallions numbered by perfect cubes, as desired, while observing all the\nstructural rules and using *exactly* L operations.\n\n────────────────────────────────\nVerification that all data are concrete and unambiguous.\n\n•  In (a) each step is of type (I) with the fixed multiplier a=1.\n•  In (b-ii) each step is of type (I) with the fixed multiplier a=3.\n•  In (b-i) the sequence (τ(k))_{1≤k≤L} is explicitly given by (5); once L is\n   known, each τ(k) is determined, hence the whole list (𝒯₁,…,𝒯_L) is fixed.\n\nAll three families fulfil the requested tasks.",
      "_meta": {
        "core_steps": [
          "Each operation T_k toggles exactly the lockers whose numbers are divisible by k; hence locker m is toggled once for every positive divisor of m.",
          "A locker’s final state depends only on the parity of its toggle-count: odd #divisors ⇒ state reversed, even ⇒ state unchanged.",
          "Write m = p1^{a1}·p2^{a2}·…·pr^{ar}; the divisor-count is (a1+1)(a2+1)…(ar+1).",
          "This product is odd ⇔ every (ai+1) is odd ⇔ every ai is even.",
          "All ai even ⇔ m is a perfect square, so exactly the square-numbered lockers end up open."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Total number of lockers (and hence of operations); only needs to be a positive integer.",
            "original": "n"
          },
          "slot2": {
            "description": "Name of the two possible states of a locker; any binary labels work since only parity matters.",
            "original": "locked / unlocked (open / closed)"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}