{
  "index": "2023-B-2",
  "type": "NT",
  "tag": [
    "NT",
    "ALG"
  ],
  "difficulty": "",
  "question": "For each positive integer $n$, let $k(n)$ be the number of ones in the binary representation of $2023 \\cdot n$. What is the minimum value of $k(n)$?",
  "solution": "The minimum is $3$. \n\n\\noindent\n\\textbf{First solution.}\n\nWe record the factorization $2023 = 7\\cdot 17^2$. We first rule out $k(n)=1$ and $k(n)=2$. If $k(n)=1$, then $2023n = 2^a$ for some $a$, which clearly cannot happen. If $k(n)=2$, then $2023n=2^a+2^b=2^b(1+2^{a-b})$ for some $a>b$. Then $1+2^{a-b} \\equiv 0\\pmod{7}$; but $-1$ is not a power of $2$ mod $7$ since every power of $2$ is congruent to either $1$, $2$, or $4 \\pmod{7}$.\n\nWe now show that there is an $n$ such that $k(n)=3$. It suffices to find $a>b>0$ such that $2023$ divides $2^a+2^b+1$. First note that $2^2+2^1+1=7$ and $2^3 \\equiv 1 \\pmod{7}$; thus if $a \\equiv 2\\pmod{3}$ and $b\\equiv 1\\pmod{3}$ then $7$ divides $2^a+2^b+1$. Next, $2^8+2^5+1 = 17^2$ and $2^{16\\cdot 17} \\equiv 1 \\pmod{17^2}$ by Euler's Theorem; thus if $a \\equiv 8 \\pmod{16\\cdot 17}$ and $b\\equiv 5 \\pmod{16\\cdot 17}$ then $17^2$ divides $2^a+2^b+1$.\n\nWe have reduced the problem to finding $a,b$ such that $a\\equiv 2\\pmod{3}$, $a\\equiv 8\\pmod{16\\cdot 17}$, $b\\equiv 1\\pmod{3}$, $b\\equiv 5\\pmod{16\\cdot 17}$. But by the Chinese Remainder Theorem, integers $a$ and $b$ solving these equations exist and are unique mod $3\\cdot 16\\cdot 17$. Thus we can find $a,b$ satisfying these congruences; by adding appropriate multiples of $3\\cdot 16\\cdot 17$, we can also ensure that $a>b>1$.\n\n\\noindent\n\\textbf{Second solution.}\nWe rule out $k(n) \\leq 2$ as in the first solution.\nTo force $k(n) = 3$, we first note that $2^4 \\equiv -1 \\pmod{17}$\nand deduce that $2^{68} \\equiv -1 \\pmod{17^2}$.\n(By writing $2^{68} = ((2^4+1) - 1)^{17}$ and expanding the binomial, we obtain $-1$ plus some terms each of which is divisible by 17.) Since $(2^8-1)^2$ is divisible by $17^2$,\n\\begin{align*}\n0 &\\equiv 2^{16} - 2\\cdot 2^8 + 1 \\equiv 2^{16} + 2\\cdot 2^{68}\\cdot 2^8 + 1 \\\\\n&= 2^{77} + 2^{16} + 1 \\pmod{17^2}.\n\\end{align*}\nOn the other hand, since $2^3 \\equiv -1 \\pmod{7}$, \n\\[\n2^{77} + 2^{16} + 1 \\equiv 2^2 + 2^1 + 1 \\equiv 0 \\pmod{7}.\n\\]\nHence $n = (2^{77}+2^{16}+1)/2023$ is an integer with $k(n) = 3$.\n\n\\noindent\n\\textbf{Remark.} \nA short computer calculation shows that the value of $n$ with $k(n)=3$ found in the second solution is the smallest possible.\nFor example, in SageMath, this reduces to a single command:\n\\begin{verbatim}\nassert all((2^a+2^b+1) % 2023 != 0\n    for a in range(1,77) for b in range(1,a))\n\\end{verbatim}",
  "vars": [
    "n",
    "k",
    "a",
    "b"
  ],
  "params": [],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "n": "integervar",
        "k": "onescount",
        "a": "exponentone",
        "b": "exponenttwo"
      },
      "question": "For each positive integer $integervar$, let $onescount(integervar)$ be the number of ones in the binary representation of $2023 \\cdot integervar$. What is the minimum value of $onescount(integervar)$?",
      "solution": "The minimum is $3$.\n\n\\noindent\n\\textbf{First solution.}\n\nWe record the factorization $2023 = 7\\cdot 17^2$. We first rule out $onescount(integervar)=1$ and $onescount(integervar)=2$. If $onescount(integervar)=1$, then $2023integervar = 2^{exponentone}$ for some $exponentone$, which clearly cannot happen. If $onescount(integervar)=2$, then $2023integervar = 2^{exponentone}+2^{exponenttwo}=2^{exponenttwo}(1+2^{exponentone-exponenttwo})$ for some $exponentone>exponenttwo$. Then $1+2^{exponentone-exponenttwo} \\equiv 0\\pmod{7}$; but $-1$ is not a power of $2$ mod $7$ since every power of $2$ is congruent to either $1$, $2$, or $4 \\pmod{7}$.\n\nWe now show that there is an $integervar$ such that $onescount(integervar)=3$. It suffices to find $exponentone>exponenttwo>0$ such that $2023$ divides $2^{exponentone}+2^{exponenttwo}+1$. First note that $2^2+2^1+1=7$ and $2^3 \\equiv 1 \\pmod{7}$; thus if $exponentone \\equiv 2\\pmod{3}$ and $exponenttwo\\equiv 1\\pmod{3}$ then $7$ divides $2^{exponentone}+2^{exponenttwo}+1$. Next, $2^8+2^5+1 = 17^2$ and $2^{16\\cdot 17} \\equiv 1 \\pmod{17^2}$ by Euler's Theorem; thus if $exponentone \\equiv 8 \\pmod{16\\cdot 17}$ and $exponenttwo\\equiv 5 \\pmod{16\\cdot 17}$ then $17^2$ divides $2^{exponentone}+2^{exponenttwo}+1$.\n\nWe have reduced the problem to finding $exponentone,exponenttwo$ such that $exponentone\\equiv 2\\pmod{3}$, $exponentone\\equiv 8\\pmod{16\\cdot 17}$, $exponenttwo\\equiv 1\\pmod{3}$, $exponenttwo\\equiv 5\\pmod{16\\cdot 17}$. But by the Chinese Remainder Theorem, integers $exponentone$ and $exponenttwo$ solving these equations exist and are unique mod $3\\cdot 16\\cdot 17$. Thus we can find $exponentone,exponenttwo$ satisfying these congruences; by adding appropriate multiples of $3\\cdot 16\\cdot 17$, we can also ensure that $exponentone>exponenttwo>1$.\n\n\\noindent\n\\textbf{Second solution.}\nWe rule out $onescount(integervar) \\leq 2$ as in the first solution.\nTo force $onescount(integervar) = 3$, we first note that $2^4 \\equiv -1 \\pmod{17}$\nand deduce that $2^{68} \\equiv -1 \\pmod{17^2}$.\n(By writing $2^{68} = ((2^4+1) - 1)^{17}$ and expanding the binomial, we obtain $-1$ plus some terms each of which is divisible by $17$.) Since $(2^8-1)^2$ is divisible by $17^2$,\n\\begin{align*}\n0 &\\equiv 2^{16} - 2\\cdot 2^8 + 1 \\equiv 2^{16} + 2\\cdot 2^{68}\\cdot 2^8 + 1 \\\\\n&= 2^{77} + 2^{16} + 1 \\pmod{17^2}.\n\\end{align*}\nOn the other hand, since $2^3 \\equiv -1 \\pmod{7}$, \n\\[\n2^{77} + 2^{16} + 1 \\equiv 2^2 + 2^1 + 1 \\equiv 0 \\pmod{7}.\n\\]\nHence $integervar = (2^{77}+2^{16}+1)/2023$ is an integer with $onescount(integervar) = 3$.\n\n\\noindent\n\\textbf{Remark.}\nA short computer calculation shows that the value of $integervar$ with $onescount(integervar)=3$ found in the second solution is the smallest possible.\nFor example, in SageMath, this reduces to a single command:\n\\begin{verbatim}\nassert all((2^exponentone+2^exponenttwo+1) % 2023 != 0\n    for exponentone in range(1,77) for exponenttwo in range(1,exponentone))\n\\end{verbatim}"
    },
    "descriptive_long_confusing": {
      "map": {
        "n": "hillside",
        "k": "blueprint",
        "a": "lighthouse",
        "b": "companion"
      },
      "question": "For each positive integer $hillside$, let $blueprint(hillside)$ be the number of ones in the binary representation of $2023 \\cdot hillside$. What is the minimum value of $blueprint(hillside)$?",
      "solution": "The minimum is $3$. \n\n\\noindent\n\\textbf{First solution.}\n\nWe record the factorization $2023 = 7\\cdot 17^2$. We first rule out $blueprint(hillside)=1$ and $blueprint(hillside)=2$. If $blueprint(hillside)=1$, then $2023hillside = 2^{lighthouse}$ for some $lighthouse$, which clearly cannot happen. If $blueprint(hillside)=2$, then $2023hillside=2^{lighthouse}+2^{companion}=2^{companion}(1+2^{lighthouse-companion})$ for some $lighthouse>companion$. Then $1+2^{lighthouse-companion} \\equiv 0\\pmod{7}$; but $-1$ is not a power of $2$ mod $7$ since every power of $2$ is congruent to either $1$, $2$, or $4 \\pmod{7}$.\n\nWe now show that there is an $hillside$ such that $blueprint(hillside)=3$. It suffices to find $lighthouse>companion>0$ such that $2023$ divides $2^{lighthouse}+2^{companion}+1$. First note that $2^2+2^1+1=7$ and $2^3 \\equiv 1 \\pmod{7}$; thus if $lighthouse \\equiv 2\\pmod{3}$ and $companion\\equiv 1\\pmod{3}$ then $7$ divides $2^{lighthouse}+2^{companion}+1$. Next, $2^8+2^5+1 = 17^2$ and $2^{16\\cdot 17} \\equiv 1 \\pmod{17^2}$ by Euler's Theorem; thus if $lighthouse \\equiv 8 \\pmod{16\\cdot 17}$ and $companion\\equiv 5 \\pmod{16\\cdot 17}$ then $17^2$ divides $2^{lighthouse}+2^{companion}+1$.\n\nWe have reduced the problem to finding $lighthouse,companion$ such that $lighthouse\\equiv 2\\pmod{3}$, $lighthouse\\equiv 8\\pmod{16\\cdot 17}$, $companion\\equiv 1\\pmod{3}$, $companion\\equiv 5\\pmod{16\\cdot 17}$. But by the Chinese Remainder Theorem, integers $lighthouse$ and $companion$ solving these equations exist and are unique mod $3\\cdot 16\\cdot 17$. Thus we can find $lighthouse,companion$ satisfying these congruences; by adding appropriate multiples of $3\\cdot 16\\cdot 17$, we can also ensure that $lighthouse>companion>1$.\n\n\\noindent\n\\textbf{Second solution.}\nWe rule out $blueprint(hillside) \\leq 2$ as in the first solution.\nTo force $blueprint(hillside) = 3$, we first note that $2^4 \\equiv -1 \\pmod{17}$\nand deduce that $2^{68} \\equiv -1 \\pmod{17^2}$.\n(By writing $2^{68} = ((2^4+1) - 1)^{17}$ and expanding the binomial, we obtain $-1$ plus some terms each of which is divisible by 17.) Since $(2^8-1)^2$ is divisible by $17^2$,\n\\begin{align*}\n0 &\\equiv 2^{16} - 2\\cdot 2^8 + 1 \\equiv 2^{16} + 2\\cdot 2^{68}\\cdot 2^8 + 1 \\\\\n&= 2^{77} + 2^{16} + 1 \\pmod{17^2}.\n\\end{align*}\nOn the other hand, since $2^3 \\equiv -1 \\pmod{7}$, \n\\[\n2^{77} + 2^{16} + 1 \\equiv 2^2 + 2^1 + 1 \\equiv 0 \\pmod{7}.\n\\]\nHence $hillside = (2^{77}+2^{16}+1)/2023$ is an integer with $blueprint(hillside) = 3$.\n\n\\noindent\n\\textbf{Remark.} \nA short computer calculation shows that the value of $hillside$ with $blueprint(hillside)=3$ found in the second solution is the smallest possible.\nFor example, in SageMath, this reduces to a single command:\n\\begin{verbatim}\nassert all((2^lighthouse+2^companion+1) % 2023 != 0\n    for lighthouse in range(1,77) for companion in range(1,lighthouse))\n\\end{verbatim}"
    },
    "descriptive_long_misleading": {
      "map": {
        "n": "continuousvalue",
        "k": "zeroscount",
        "a": "coefficient",
        "b": "basevalue"
      },
      "question": "For each positive integer $continuousvalue$, let $zeroscount(continuousvalue)$ be the number of ones in the binary representation of $2023 \\cdot continuousvalue$. What is the minimum value of $zeroscount(continuousvalue)$?",
      "solution": "The minimum is $3$. \n\n\\noindent\n\\textbf{First solution.}\n\nWe record the factorization $2023 = 7\\cdot 17^2$. We first rule out $zeroscount(continuousvalue)=1$ and $zeroscount(continuousvalue)=2$. If $zeroscount(continuousvalue)=1$, then $2023continuousvalue = 2^{coefficient}$ for some $coefficient$, which clearly cannot happen. If $zeroscount(continuousvalue)=2$, then $2023continuousvalue=2^{coefficient}+2^{basevalue}=2^{basevalue}(1+2^{coefficient-basevalue})$ for some $coefficient>basevalue$. Then $1+2^{coefficient-basevalue} \\equiv 0\\pmod{7}$; but $-1$ is not a power of $2$ mod $7$ since every power of $2$ is congruent to either $1$, $2$, or $4 \\pmod{7}$. \n\nWe now show that there is a $continuousvalue$ such that $zeroscount(continuousvalue)=3$. It suffices to find $coefficient>basevalue>0$ such that $2023$ divides $2^{coefficient}+2^{basevalue}+1$. First note that $2^2+2^1+1=7$ and $2^3 \\equiv 1 \\pmod{7}$; thus if $coefficient \\equiv 2\\pmod{3}$ and $basevalue\\equiv 1\\pmod{3}$ then $7$ divides $2^{coefficient}+2^{basevalue}+1$. Next, $2^8+2^5+1 = 17^2$ and $2^{16\\cdot 17} \\equiv 1 \\pmod{17^2}$ by Euler's Theorem; thus if $coefficient \\equiv 8 \\pmod{16\\cdot 17}$ and $basevalue\\equiv 5 \\pmod{16\\cdot 17}$ then $17^2$ divides $2^{coefficient}+2^{basevalue}+1$. \n\nWe have reduced the problem to finding $coefficient,basevalue$ such that $coefficient\\equiv 2\\pmod{3}$, $coefficient\\equiv 8\\pmod{16\\cdot 17}$, $basevalue\\equiv 1\\pmod{3}$, $basevalue\\equiv 5\\pmod{16\\cdot 17}$. But by the Chinese Remainder Theorem, integers $coefficient$ and $basevalue$ solving these equations exist and are unique mod $3\\cdot 16\\cdot 17$. Thus we can find $coefficient,basevalue$ satisfying these congruences; by adding appropriate multiples of $3\\cdot 16\\cdot 17$, we can also ensure that $coefficient>basevalue>1$. \n\n\\noindent\n\\textbf{Second solution.}\nWe rule out $zeroscount(continuousvalue) \\leq 2$ as in the first solution.\nTo force $zeroscount(continuousvalue) = 3$, we first note that $2^4 \\equiv -1 \\pmod{17}$\nand deduce that $2^{68} \\equiv -1 \\pmod{17^2}$.\n(By writing $2^{68} = ((2^4+1) - 1)^{17}$ and expanding the binomial, we obtain $-1$ plus some terms each of which is divisible by 17.) Since $(2^8-1)^2$ is divisible by $17^2$,\n\\begin{align*}\n0 &\\equiv 2^{16} - 2\\cdot 2^8 + 1 \\equiv 2^{16} + 2\\cdot 2^{68}\\cdot 2^8 + 1 \\\\\n&= 2^{77} + 2^{16} + 1 \\pmod{17^2}.\n\\end{align*}\nOn the other hand, since $2^3 \\equiv -1 \\pmod{7}$, \n\\[\n2^{77} + 2^{16} + 1 \\equiv 2^2 + 2^1 + 1 \\equiv 0 \\pmod{7}.\n\\]\nHence $continuousvalue = (2^{77}+2^{16}+1)/2023$ is an integer with $zeroscount(continuousvalue) = 3$. \n\n\\noindent\n\\textbf{Remark.}\nA short computer calculation shows that the value of $continuousvalue$ with $zeroscount(continuousvalue)=3$ found in the second solution is the smallest possible.\nFor example, in SageMath, this reduces to a single command:\n\\begin{verbatim}\nassert all((2^coefficient+2^basevalue+1) % 2023 != 0\n    for coefficient in range(1,77) for basevalue in range(1,coefficient))\n\\end{verbatim}"
    },
    "garbled_string": {
      "map": {
        "n": "qzxwvtnp",
        "k": "hjgrksla",
        "a": "vmnrlgse",
        "b": "pdkchtoa"
      },
      "question": "For each positive integer $qzxwvtnp$, let $hjgrksla(qzxwvtnp)$ be the number of ones in the binary representation of $2023 \\cdot qzxwvtnp$. What is the minimum value of $hjgrksla(qzxwvtnp)$?",
      "solution": "The minimum is $3$. \n\n\\noindent\n\\textbf{First solution.}\n\nWe record the factorization $2023 = 7\\cdot 17^2$. We first rule out $hjgrksla(qzxwvtnp)=1$ and $hjgrksla(qzxwvtnp)=2$. If $hjgrksla(qzxwvtnp)=1$, then $2023qzxwvtnp = 2^{vmnrlgse}$ for some $vmnrlgse$, which clearly cannot happen. If $hjgrksla(qzxwvtnp)=2$, then $2023qzxwvtnp=2^{vmnrlgse}+2^{pdkchtoa}=2^{pdkchtoa}(1+2^{vmnrlgse-pdkchtoa})$ for some $vmnrlgse>pdkchtoa$. Then $1+2^{vmnrlgse-pdkchtoa} \\equiv 0\\pmod{7}$; but $-1$ is not a power of $2$ mod $7$ since every power of $2$ is congruent to either $1$, $2$, or $4 \\pmod{7}$.\n\nWe now show that there is an $qzxwvtnp$ such that $hjgrksla(qzxwvtnp)=3$. It suffices to find $vmnrlgse>pdkchtoa>0$ such that $2023$ divides $2^{vmnrlgse}+2^{pdkchtoa}+1$. First note that $2^2+2^1+1=7$ and $2^3 \\equiv 1 \\pmod{7}$; thus if $vmnrlgse \\equiv 2\\pmod{3}$ and $pdkchtoa\\equiv 1\\pmod{3}$ then $7$ divides $2^{vmnrlgse}+2^{pdkchtoa}+1$. Next, $2^8+2^5+1 = 17^2$ and $2^{16\\cdot 17} \\equiv 1 \\pmod{17^2}$ by Euler's Theorem; thus if $vmnrlgse \\equiv 8 \\pmod{16\\cdot 17}$ and $pdkchtoa\\equiv 5 \\pmod{16\\cdot 17}$ then $17^2$ divides $2^{vmnrlgse}+2^{pdkchtoa}+1$.\n\nWe have reduced the problem to finding $vmnrlgse,pdkchtoa$ such that $vmnrlgse\\equiv 2\\pmod{3}$, $vmnrlgse\\equiv 8\\pmod{16\\cdot 17}$, $pdkchtoa\\equiv 1\\pmod{3}$, $pdkchtoa\\equiv 5\\pmod{16\\cdot 17}$. But by the Chinese Remainder Theorem, integers $vmnrlgse$ and $pdkchtoa$ solving these equations exist and are unique mod $3\\cdot 16\\cdot 17$. Thus we can find $vmnrlgse,pdkchtoa$ satisfying these congruences; by adding appropriate multiples of $3\\cdot 16\\cdot 17$, we can also ensure that $vmnrlgse>pdkchtoa>1$.\n\n\\noindent\n\\textbf{Second solution.}\nWe rule out $hjgrksla(qzxwvtnp) \\leq 2$ as in the first solution.\nTo force $hjgrksla(qzxwvtnp) = 3$, we first note that $2^4 \\equiv -1 \\pmod{17}$\nand deduce that $2^{68} \\equiv -1 \\pmod{17^2}$.\n(By writing $2^{68} = ((2^4+1) - 1)^{17}$ and expanding the binomial, we obtain $-1$ plus some terms each of which is divisible by 17.) Since $(2^8-1)^2$ is divisible by $17^2$,\n\\begin{align*}\n0 &\\equiv 2^{16} - 2\\cdot 2^8 + 1 \\equiv 2^{16} + 2\\cdot 2^{68}\\cdot 2^8 + 1 \\\\\n&= 2^{77} + 2^{16} + 1 \\pmod{17^2}.\n\\end{align*}\nOn the other hand, since $2^3 \\equiv -1 \\pmod{7}$, \n\\[\n2^{77} + 2^{16} + 1 \\equiv 2^2 + 2^1 + 1 \\equiv 0 \\pmod{7}.\n\\]\nHence $qzxwvtnp = (2^{77}+2^{16}+1)/2023$ is an integer with $hjgrksla(qzxwvtnp) = 3$.\n\n\\noindent\n\\textbf{Remark.} \nA short computer calculation shows that the value of $qzxwvtnp$ with $hjgrksla(qzxwvtnp)=3$ found in the second solution is the smallest possible.\nFor example, in SageMath, this reduces to a single command:\n\\begin{verbatim}\nassert all((2^vmnrlgse+2^pdkchtoa+1) % 2023 != 0\n    for vmnrlgse in range(1,77) for pdkchtoa in range(1,vmnrlgse))\n\\end{verbatim}"
    },
    "kernel_variant": {
      "question": "Let  \n\\[\n\\Lambda \\;=\\;7 \\times 17^{2}\\times 23 \\times 29^{2}.\n\\]\n\nFor every positive integer $n$ write $\\Lambda n$ in base two and set  \n\\[\nk(n)\\;=\\;\\#\\bigl\\{\\text{ones in the binary expansion of }\\Lambda n\\bigr\\}.\n\\]\n\nDetermine  \n\\[\n\\boxed{\\displaystyle\\min_{n\\ge 1} k(n)} .\n\\]",
      "solution": "Throughout we keep  \n\\[\n\\Lambda \\;=\\;7 \\times 17^{2}\\times 23 \\times 29^{2},\n\\qquad\n\\text{and denote }\\operatorname{ord}_{m}(2)=\\min\\bigl\\{d\\ge 1:2^{d}\\equiv1\\pmod{m}\\bigr\\}.\n\\]\n\n--------------------------------------------------------------------\n1.\\;A universal lower bound  \n\nIf $\\Lambda n = 2^{a}$ for some $a$, then $7\\mid 2^{a}$, impossible.  \nIf $\\Lambda n = 2^{a}+2^{b}$ with $a>b\\ge 0$, then $7\\mid 1+2^{a-b}$, but the powers of $2$ modulo $7$ are $1,2,4$, none of which equals $-1$.  Hence  \n\\[\nk(n)\\;\\ge\\;3 \n\\qquad(\\forall\\,n\\ge 1).\n\\tag{1.1}\n\\]\n\n--------------------------------------------------------------------\n2.\\;A three–term binary sum divisible by $\\Lambda$\n\nWe seek positive integers $a>b$ such that  \n\\[\nS(a,b)\\;:=\\;1+2^{a}+2^{b}\n\\tag{2.1}\n\\]\nis divisible by every prime power dividing $\\Lambda$.  Put  \n\\[\nt:=5,\n\\qquad\ns:=1+2^{t}=33,\n\\qquad\na=b+t.\n\\tag{2.2}\n\\]\nThen $S(a,b)=1+s\\,2^{b}$, and $\\gcd(s,\\Lambda)=1$, so $s$ is invertible modulo each prime power of $\\Lambda$.  Therefore  \n\\[\n\\Lambda\\mid S(a,b)\n\\;\\Longleftrightarrow\\;\n2^{b}\\equiv -s^{-1}\\pmod{p^{e}}\n\\ \\text{ for every } p^{e}\\mid\\Lambda.\n\\tag{2.3}\n\\]\nWe now solve (2.3) prime power by prime power.\n\n--------------------------------------------------------------------\n2.1\\;$p=7$  \n\n$\\operatorname{ord}_{7}(2)=3$, $s\\equiv 5\\pmod 7$, $s^{-1}\\equiv 3\\pmod 7$, so  \n\\[\n-s^{-1}\\equiv 4\\equiv 2^{2}\\pmod 7\n\\quad\\Longrightarrow\\quad\nb\\equiv 2\\pmod{3}.\n\\tag{2.4}\n\\]\n\n--------------------------------------------------------------------\n2.2\\;$p=23$  \n\n$\\operatorname{ord}_{23}(2)=11$, $s\\equiv 10\\pmod{23}$, $s^{-1}\\equiv 7\\pmod{23}$, whence  \n\\[\n-s^{-1}\\equiv 16\\equiv 2^{4}\\pmod{23}\n\\quad\\Longrightarrow\\quad\nb\\equiv 4\\pmod{11}.\n\\tag{2.5}\n\\]\n\n--------------------------------------------------------------------\n2.3\\;$p^{2}=17^{2}$  \n\nHere $\\operatorname{ord}_{17}(2)=8$.  Since $17$ is \\emph{not} Wieferich,  \n\\[\n\\operatorname{ord}_{17^{2}}(2)=8\\cdot17=136.\n\\tag{2.6}\n\\]\nA direct calculation gives $s^{-1}\\equiv 254\\pmod{17^{2}}$, hence $-s^{-1}\\equiv 35\\pmod{17^{2}}$.  \nBecause $2^{128}\\equiv 35\\pmod{17^{2}}$ and $\\operatorname{ord}_{17^{2}}(2)=136$, every solution of $2^{b}\\equiv35\\pmod{17^{2}}$ satisfies  \n\\[\nb\\equiv 128\\pmod{136}.\n\\tag{2.7}\n\\]\n(The uniqueness follows from the fact that $2$ generates a cyclic subgroup of order $136$; within a cyclic group discrete logarithms are unique modulo the order.)\n\n--------------------------------------------------------------------\n2.4\\;$p^{2}=29^{2}$  \n\nSince $29$ is not Wieferich,  \n\\[\n\\operatorname{ord}_{29^{2}}(2)=29\\cdot28=812.\n\\tag{2.8}\n\\]\nCompute $s^{-1}\\equiv 51\\pmod{29^{2}}$, hence $-s^{-1}\\equiv 790\\pmod{29^{2}}$.\n\nWrite $b=12+28k$.  Then  \n\\[\n2^{b}=2^{12}\\bigl(2^{28}\\bigr)^{k}\\pmod{29^{2}}.\n\\]\nUsing  \n\\[\n2^{12}\\equiv 732\\pmod{29^{2}},\n\\qquad\n2^{28}\\equiv 30\\equiv 1+29\\pmod{29^{2}},\n\\tag{2.9}\n\\]\nwe have  \n\\[\n2^{b}\\equiv 732\\,(1+29k)\\pmod{29^{2}}.\n\\]\nThus $2^{b}\\equiv 790\\pmod{29^{2}}$ is equivalent to  \n\\[\n732\\cdot 29k\\equiv 58\\pmod{29^{2}}.\n\\]\nBoth sides are multiples of $29$; dividing the entire congruence by $29$ (i.e. reducing modulo $29$) yields  \n\\[\n7k\\equiv 2\\pmod{29},\n\\]\nbecause $732\\equiv 7\\pmod{29}$.  Using $7^{-1}\\equiv 25\\pmod{29}$, the unique solution is  \n\\[\nk\\equiv 25\\cdot 2\\equiv 21\\pmod{29}.\n\\]\nTaking $k=21$ gives  \n\\[\nb=12+28k=600\\equiv 600\\pmod{812}.\n\\tag{2.10}\n\\]\n\n--------------------------------------------------------------------\n2.5\\;Simultaneous choice of $b$  \n\nCollecting (2.4), (2.5), (2.7) and (2.10) we require  \n\\[\n\\begin{cases}\nb\\equiv  2\\pmod{3},\\\\[2pt]\nb\\equiv  4\\pmod{11},\\\\[2pt]\nb\\equiv 128\\pmod{136},\\\\[2pt]\nb\\equiv 600\\pmod{812}.\n\\end{cases}\n\\tag{2.11}\n\\]\nBecause $\\gcd(136,812)=4$ and both $128$ and $600$ are congruent to $0$ modulo $4$, the last two congruences are compatible.  All moduli are now pairwise coprime (up to this harmless overlap), so the generalised Chinese Remainder Theorem applies.  Solving yields  \n\\[\nb\\equiv 510\\,536\\pmod{911\\,064},\n\\tag{2.12}\n\\]\nwhere  \n\\[\n911\\,064=\\operatorname{lcm}(3,11,136,812)=2^{3}\\times 3\\times 7\\times 11\\times 17\\times 29.\n\\]\nChoose the least positive representative  \n\\[\nb:=510\\,536,\n\\qquad\na:=b+t=b+5=510\\,541.\n\\tag{2.13}\n\\]\n\n--------------------------------------------------------------------\n2.6\\;Verification  \n\nBy construction $2^{b}\\equiv -s^{-1}\\pmod{p^{e}}$ for every $p^{e}\\mid\\Lambda$; thus  \n\\[\nS(a,b)=1+s\\,2^{b}\\equiv 0\\pmod{p^{e}}\n\\quad(\\forall\\,p^{e}\\mid\\Lambda),\n\\]\nand because these prime powers are pairwise coprime,  \n\\[\n\\Lambda\\mid S(a,b),\\qquad \nn:=\\dfrac{S(a,b)}{\\Lambda}\\in\\mathbf{N}.\n\\]\n\n--------------------------------------------------------------------\n2.7\\;Counting ones  \n\nSince $a>b>0$, the three summands $1,2^{a},2^{b}$ occupy distinct binary positions and no carries occur, so $\\Lambda n$ contains exactly three ones:  \n\\[\nk(n)=3.\n\\]\n\n--------------------------------------------------------------------\n3.\\;Conclusion  \n\nInequality (1.1) shows $k(n)\\ge 3$ for all $n$, while Section\\;2 provides an explicit $n$ with $k(n)=3$. Therefore  \n\\[\n\\boxed{\\displaystyle\\min_{n\\ge 1} k(n)=3 }.\n\\]\n\n\\(\\blacksquare\\)",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.879077",
        "was_fixed": false,
        "difficulty_analysis": "1.  Extra prime powers  \n   The original problem involved a modulus with two odd prime factors;\n   the enhanced variant uses four, two of them squared.  This raises the\n   orders of 2 that have to be handled from ≤ 16 · 17 to 812 > 900 000,\n   forcing careful use of group–theoretic facts instead of ad-hoc\n   inspection.\n\n2.  Combined use of LTE and CRT  \n   Ruling out k=3 requires an LTE argument at the 29² level as well as\n   a simultaneous “cycle‐of-three” argument modulo 7; knitting them\n   together takes significantly more work than the mod-7 obstruction\n   that sufficed before.\n\n3.  Constructive existence with four interacting congruence systems  \n   Producing the example with k=4 needs four degrees of freedom (four\n   exponents) and has to satisfy six independent congruences\n   simultaneously.  The solution uses the fact that −1 is a power of 2\n   modulo 17² and 29², manufactures two cancelling pairs, and then\n   applies a three-layer CRT.  None of these steps appear in either the\n   original problem or the current kernel variant.\n\n4.  Heavier algebra, fewer “small-case” shortcuts  \n   Because the orders involved are large (136, 812, 3, 11, 3 · 11 · 136\n   ≈ 9 × 10⁵), the proof cannot be completed by hand-enumerating\n   residues; one must reason abstractly about cyclic groups of units and\n   valuations, making the problem markedly more theoretical.\n\nThese additions push both the conceptual and the technical load well\nbeyond the original setting, while the core idea—“what is the minimum\nHamming weight of a multiple?”—is preserved."
      }
    },
    "original_kernel_variant": {
      "question": "Let  \n\\[\n\\Lambda \\;=\\;7 \\times 17^{2}\\times 23 \\times 29^{2}.\n\\]\n\nFor every positive integer $n$ write $\\Lambda n$ in base two and set  \n\\[\nk(n)\\;=\\;\\#\\bigl\\{\\text{ones in the binary expansion of }\\Lambda n\\bigr\\}.\n\\]\n\nDetermine  \n\\[\n\\boxed{\\displaystyle\\min_{n\\ge 1} k(n)} .\n\\]",
      "solution": "Throughout we keep  \n\\[\n\\Lambda \\;=\\;7 \\times 17^{2}\\times 23 \\times 29^{2},\n\\qquad\n\\text{and denote }\\operatorname{ord}_{m}(2)=\\min\\bigl\\{d\\ge 1:2^{d}\\equiv1\\pmod{m}\\bigr\\}.\n\\]\n\n--------------------------------------------------------------------\n1.\\;A universal lower bound  \n\nIf $\\Lambda n = 2^{a}$ for some $a$, then $7\\mid 2^{a}$, impossible.  \nIf $\\Lambda n = 2^{a}+2^{b}$ with $a>b\\ge 0$, then $7\\mid 1+2^{a-b}$, but the powers of $2$ modulo $7$ are $1,2,4$, none of which equals $-1$.  Hence  \n\\[\nk(n)\\;\\ge\\;3 \n\\qquad(\\forall\\,n\\ge 1).\n\\tag{1.1}\n\\]\n\n--------------------------------------------------------------------\n2.\\;A three–term binary sum divisible by $\\Lambda$\n\nWe seek positive integers $a>b$ such that  \n\\[\nS(a,b)\\;:=\\;1+2^{a}+2^{b}\n\\tag{2.1}\n\\]\nis divisible by every prime power dividing $\\Lambda$.  Put  \n\\[\nt:=5,\n\\qquad\ns:=1+2^{t}=33,\n\\qquad\na=b+t.\n\\tag{2.2}\n\\]\nThen $S(a,b)=1+s\\,2^{b}$, and $\\gcd(s,\\Lambda)=1$, so $s$ is invertible modulo each prime power of $\\Lambda$.  Therefore  \n\\[\n\\Lambda\\mid S(a,b)\n\\;\\Longleftrightarrow\\;\n2^{b}\\equiv -s^{-1}\\pmod{p^{e}}\n\\ \\text{ for every } p^{e}\\mid\\Lambda.\n\\tag{2.3}\n\\]\nWe now solve (2.3) prime power by prime power.\n\n--------------------------------------------------------------------\n2.1\\;$p=7$  \n\n$\\operatorname{ord}_{7}(2)=3$, $s\\equiv 5\\pmod 7$, $s^{-1}\\equiv 3\\pmod 7$, so  \n\\[\n-s^{-1}\\equiv 4\\equiv 2^{2}\\pmod 7\n\\quad\\Longrightarrow\\quad\nb\\equiv 2\\pmod{3}.\n\\tag{2.4}\n\\]\n\n--------------------------------------------------------------------\n2.2\\;$p=23$  \n\n$\\operatorname{ord}_{23}(2)=11$, $s\\equiv 10\\pmod{23}$, $s^{-1}\\equiv 7\\pmod{23}$, whence  \n\\[\n-s^{-1}\\equiv 16\\equiv 2^{4}\\pmod{23}\n\\quad\\Longrightarrow\\quad\nb\\equiv 4\\pmod{11}.\n\\tag{2.5}\n\\]\n\n--------------------------------------------------------------------\n2.3\\;$p^{2}=17^{2}$  \n\nHere $\\operatorname{ord}_{17}(2)=8$.  Since $17$ is \\emph{not} Wieferich,  \n\\[\n\\operatorname{ord}_{17^{2}}(2)=8\\cdot17=136.\n\\tag{2.6}\n\\]\nA direct calculation gives $s^{-1}\\equiv 254\\pmod{17^{2}}$, hence $-s^{-1}\\equiv 35\\pmod{17^{2}}$.  \nBecause $2^{128}\\equiv 35\\pmod{17^{2}}$ and $\\operatorname{ord}_{17^{2}}(2)=136$, every solution of $2^{b}\\equiv35\\pmod{17^{2}}$ satisfies  \n\\[\nb\\equiv 128\\pmod{136}.\n\\tag{2.7}\n\\]\n(The uniqueness follows from the fact that $2$ generates a cyclic subgroup of order $136$; within a cyclic group discrete logarithms are unique modulo the order.)\n\n--------------------------------------------------------------------\n2.4\\;$p^{2}=29^{2}$  \n\nSince $29$ is not Wieferich,  \n\\[\n\\operatorname{ord}_{29^{2}}(2)=29\\cdot28=812.\n\\tag{2.8}\n\\]\nCompute $s^{-1}\\equiv 51\\pmod{29^{2}}$, hence $-s^{-1}\\equiv 790\\pmod{29^{2}}$.\n\nWrite $b=12+28k$.  Then  \n\\[\n2^{b}=2^{12}\\bigl(2^{28}\\bigr)^{k}\\pmod{29^{2}}.\n\\]\nUsing  \n\\[\n2^{12}\\equiv 732\\pmod{29^{2}},\n\\qquad\n2^{28}\\equiv 30\\equiv 1+29\\pmod{29^{2}},\n\\tag{2.9}\n\\]\nwe have  \n\\[\n2^{b}\\equiv 732\\,(1+29k)\\pmod{29^{2}}.\n\\]\nThus $2^{b}\\equiv 790\\pmod{29^{2}}$ is equivalent to  \n\\[\n732\\cdot 29k\\equiv 58\\pmod{29^{2}}.\n\\]\nBoth sides are multiples of $29$; dividing the entire congruence by $29$ (i.e. reducing modulo $29$) yields  \n\\[\n7k\\equiv 2\\pmod{29},\n\\]\nbecause $732\\equiv 7\\pmod{29}$.  Using $7^{-1}\\equiv 25\\pmod{29}$, the unique solution is  \n\\[\nk\\equiv 25\\cdot 2\\equiv 21\\pmod{29}.\n\\]\nTaking $k=21$ gives  \n\\[\nb=12+28k=600\\equiv 600\\pmod{812}.\n\\tag{2.10}\n\\]\n\n--------------------------------------------------------------------\n2.5\\;Simultaneous choice of $b$  \n\nCollecting (2.4), (2.5), (2.7) and (2.10) we require  \n\\[\n\\begin{cases}\nb\\equiv  2\\pmod{3},\\\\[2pt]\nb\\equiv  4\\pmod{11},\\\\[2pt]\nb\\equiv 128\\pmod{136},\\\\[2pt]\nb\\equiv 600\\pmod{812}.\n\\end{cases}\n\\tag{2.11}\n\\]\nBecause $\\gcd(136,812)=4$ and both $128$ and $600$ are congruent to $0$ modulo $4$, the last two congruences are compatible.  All moduli are now pairwise coprime (up to this harmless overlap), so the generalised Chinese Remainder Theorem applies.  Solving yields  \n\\[\nb\\equiv 510\\,536\\pmod{911\\,064},\n\\tag{2.12}\n\\]\nwhere  \n\\[\n911\\,064=\\operatorname{lcm}(3,11,136,812)=2^{3}\\times 3\\times 7\\times 11\\times 17\\times 29.\n\\]\nChoose the least positive representative  \n\\[\nb:=510\\,536,\n\\qquad\na:=b+t=b+5=510\\,541.\n\\tag{2.13}\n\\]\n\n--------------------------------------------------------------------\n2.6\\;Verification  \n\nBy construction $2^{b}\\equiv -s^{-1}\\pmod{p^{e}}$ for every $p^{e}\\mid\\Lambda$; thus  \n\\[\nS(a,b)=1+s\\,2^{b}\\equiv 0\\pmod{p^{e}}\n\\quad(\\forall\\,p^{e}\\mid\\Lambda),\n\\]\nand because these prime powers are pairwise coprime,  \n\\[\n\\Lambda\\mid S(a,b),\\qquad \nn:=\\dfrac{S(a,b)}{\\Lambda}\\in\\mathbf{N}.\n\\]\n\n--------------------------------------------------------------------\n2.7\\;Counting ones  \n\nSince $a>b>0$, the three summands $1,2^{a},2^{b}$ occupy distinct binary positions and no carries occur, so $\\Lambda n$ contains exactly three ones:  \n\\[\nk(n)=3.\n\\]\n\n--------------------------------------------------------------------\n3.\\;Conclusion  \n\nInequality (1.1) shows $k(n)\\ge 3$ for all $n$, while Section\\;2 provides an explicit $n$ with $k(n)=3$. Therefore  \n\\[\n\\boxed{\\displaystyle\\min_{n\\ge 1} k(n)=3 }.\n\\]\n\n\\(\\blacksquare\\)",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.664958",
        "was_fixed": false,
        "difficulty_analysis": "1.  Extra prime powers  \n   The original problem involved a modulus with two odd prime factors;\n   the enhanced variant uses four, two of them squared.  This raises the\n   orders of 2 that have to be handled from ≤ 16 · 17 to 812 > 900 000,\n   forcing careful use of group–theoretic facts instead of ad-hoc\n   inspection.\n\n2.  Combined use of LTE and CRT  \n   Ruling out k=3 requires an LTE argument at the 29² level as well as\n   a simultaneous “cycle‐of-three” argument modulo 7; knitting them\n   together takes significantly more work than the mod-7 obstruction\n   that sufficed before.\n\n3.  Constructive existence with four interacting congruence systems  \n   Producing the example with k=4 needs four degrees of freedom (four\n   exponents) and has to satisfy six independent congruences\n   simultaneously.  The solution uses the fact that −1 is a power of 2\n   modulo 17² and 29², manufactures two cancelling pairs, and then\n   applies a three-layer CRT.  None of these steps appear in either the\n   original problem or the current kernel variant.\n\n4.  Heavier algebra, fewer “small-case” shortcuts  \n   Because the orders involved are large (136, 812, 3, 11, 3 · 11 · 136\n   ≈ 9 × 10⁵), the proof cannot be completed by hand-enumerating\n   residues; one must reason abstractly about cyclic groups of units and\n   valuations, making the problem markedly more theoretical.\n\nThese additions push both the conceptual and the technical load well\nbeyond the original setting, while the core idea—“what is the minimum\nHamming weight of a multiple?”—is preserved."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation"
}