{
  "index": "1960-B-1",
  "type": "NT",
  "tag": [
    "NT",
    "ALG"
  ],
  "difficulty": "",
  "question": "1. Find all solutions of \\( n^{m}=m^{n} \\) in integers \\( n \\) and \\( m(x \\neq m) \\). Prove that you have obtained all of them.",
  "solution": "Solution. First we consider positive integer solutions. Then the given equation is equivalent to\n\\[\n\\frac{1}{m} \\log m=\\frac{1}{n} \\log n .\n\\]\n\nThe function \\( (\\log x) / x \\) is strictly increasing for \\( 0<x \\leq e \\) and strictly decreasing for \\( e \\leq x \\), as we see by considering its derivative \\( (1-\\log x) / x^{2} \\). Hence a solution of (1) with \\( m<n \\) must have \\( m<e \\), so \\( m=1 \\) or 2 . If \\( m=1 \\), there are no values of \\( n>1 \\) which satisfy (1). If \\( m=2 \\), then \\( n=4 \\) is the unique solution of (1) with \\( n>2 \\). Thus \\( m=2, n=4 \\) is the only solution of the given equation in positive integers with \\( m<n \\). Clearly, there is just one other solution in positive integers with \\( m \\neq n \\), namely, \\( m=4, n=2 \\).\n\nIn the original equation neither \\( m \\) nor \\( n \\) can be zero, since \\( 0^{n}=n^{0} \\) has no non-zero solution \\( n \\). If \\( m \\) is negative, say \\( m=-k \\), and \\( n \\) is positive, the requirement becomes \\( (-k)^{n}=1 / n^{k} \\). But this has no positive integral solution \\( n \\), since the left member would be an integer but the right would not, unless \\( n=1 \\), in which case the left member is negative.\n\nIf both \\( m \\) and \\( n \\) are negative, say \\( m=-k, n=-l \\), then \\( (-k)^{-1}= \\) \\( (-l)^{k} \\) giving\n\\[\n(-1)^{\\prime}=(-1)^{k} \\quad \\text { and } \\quad k^{\\prime}=l^{k}\n\\]\nwith \\( k \\) and \\( l \\) unequal positive integers. As we have seen, this implies \\( k=2 \\), \\( l=4 \\), or vice versa. Both of these solutions satisfy the sign condition.\n\nThus there are four solutions to the original equation in unequal integers:\n\\[\n(m, n)=(2,4),(4,2),(-2,-4),(-4,-2) .\n\\]\n\nThe problem is related to Problem A.M. 1 of the Twelfth Competition. It has attracted the attention of mathematicians at least since the eighteenth century. In Solomon Hurwitz, \"On the Rational Solutions of \\( m^{n}=n^{m} \\) with \\( m \\neq n \\),\" American Mathematical Monthly, vol. 74 (1967), pages 298-300, it is shown that all rational solutions of the equation with \\( |m|>|n| \\) are given by\n\\[\nm=\\left(1+\\frac{1}{s}\\right)^{s+1} \\quad n=\\left(1+\\frac{1}{s}\\right)^{s}\n\\]\nwhere \\( s \\) is a positive integer, and\n\\[\nm=-\\left(1+\\frac{1}{s}\\right)^{s+1} \\quad n=-\\left(1+\\frac{1}{s}\\right)^{s}\n\\]\nwhere \\( s \\) is a negative odd integer.",
  "vars": [
    "m",
    "n",
    "x",
    "k",
    "l",
    "s"
  ],
  "params": [],
  "sci_consts": [
    "e"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "m": "intmval",
        "n": "intnval",
        "x": "realxvar",
        "k": "intktemp",
        "l": "intltemp",
        "s": "intstep"
      },
      "question": "1. Find all solutions of \\( intnval^{intmval}=intmval^{intnval} \\) in integers \\( intnval \\) and \\( intmval(realxvar \\neq intmval) \\). Prove that you have obtained all of them.",
      "solution": "Solution. First we consider positive integer solutions. Then the given equation is equivalent to\n\\[\n\\frac{1}{intmval}\\log intmval=\\frac{1}{intnval}\\log intnval .\n\\]\n\nThe function \\( (\\log realxvar)/realxvar \\) is strictly increasing for \\( 0<realxvar\\le e \\) and strictly decreasing for \\( e\\le realxvar \\), as we see by considering its derivative \\( (1-\\log realxvar)/realxvar^{2} \\). Hence a solution of (1) with \\( intmval<intnval \\) must have \\( intmval<e \\), so \\( intmval=1 \\) or 2. If \\( intmval=1 \\), there are no values of \\( intnval>1 \\) which satisfy (1). If \\( intmval=2 \\), then \\( intnval=4 \\) is the unique solution of (1) with \\( intnval>2 \\). Thus \\( intmval=2, intnval=4 \\) is the only solution of the given equation in positive integers with \\( intmval<intnval \\). Clearly, there is just one other solution in positive integers with \\( intmval\\neq intnval \\), namely, \\( intmval=4, intnval=2 \\).\n\nIn the original equation neither \\( intmval \\) nor \\( intnval \\) can be zero, since \\( 0^{intnval}=intnval^{0} \\) has no non-zero solution \\( intnval \\). If \\( intmval \\) is negative, say \\( intmval=-intktemp \\), and \\( intnval \\) is positive, the requirement becomes \\( (-intktemp)^{intnval}=1/intnval^{intktemp} \\). But this has no positive integral solution \\( intnval \\), since the left member would be an integer but the right would not, unless \\( intnval=1 \\), in which case the left member is negative.\n\nIf both \\( intmval \\) and \\( intnval \\) are negative, say \\( intmval=-intktemp, intnval=-intltemp \\), then \\( (-intktemp)^{-1}=(-intltemp)^{intktemp} \\) giving\n\\[\n(-1)^{\\prime}=(-1)^{intktemp}\\quad\\text{and}\\quad intktemp^{\\prime}=intltemp^{intktemp}\n\\]\nwith \\( intktemp \\) and \\( intltemp \\) unequal positive integers. As we have seen, this implies \\( intktemp=2 \\), \\( intltemp=4 \\), or vice versa. Both of these solutions satisfy the sign condition.\n\nThus there are four solutions to the original equation in unequal integers:\n\\[\n(intmval,intnval)=(2,4),(4,2),(-2,-4),(-4,-2).\n\\]\n\nThe problem is related to Problem A.M. 1 of the Twelfth Competition. It has attracted the attention of mathematicians at least since the eighteenth century. In Solomon Hurwitz, “On the Rational Solutions of \\( intmval^{intnval}=intnval^{intmval} \\) with \\( intmval\\neq intnval \\),” American Mathematical Monthly, vol. 74 (1967), pages 298–300, it is shown that all rational solutions of the equation with \\( |intmval|>|intnval| \\) are given by\n\\[\nintmval=\\left(1+\\frac{1}{intstep}\\right)^{intstep+1}\\quad intnval=\\left(1+\\frac{1}{intstep}\\right)^{intstep}\n\\]\nwhere \\( intstep \\) is a positive integer, and\n\\[\nintmval=-\\left(1+\\frac{1}{intstep}\\right)^{intstep+1}\\quad intnval=-\\left(1+\\frac{1}{intstep}\\right)^{intstep}\n\\]\nwhere \\( intstep \\) is a negative odd integer."
    },
    "descriptive_long_confusing": {
      "map": {
        "m": "wallpaper",
        "n": "teardrop",
        "x": "sailboat",
        "k": "blueberry",
        "l": "raincloud",
        "s": "paintbrush"
      },
      "question": "1. Find all solutions of \\( teardrop^{wallpaper}=wallpaper^{teardrop} \\) in integers \\( teardrop \\) and \\( wallpaper(sailboat \\neq wallpaper) \\). Prove that you have obtained all of them.",
      "solution": "Solution. First we consider positive integer solutions. Then the given equation is equivalent to\n\\[\n\\frac{1}{wallpaper} \\log wallpaper = \\frac{1}{teardrop} \\log teardrop .\n\\]\n\nThe function \\( (\\log sailboat) / sailboat \\) is strictly increasing for \\( 0<sailboat \\leq e \\) and strictly decreasing for \\( e \\leq sailboat \\), as we see by considering its derivative \\( (1-\\log sailboat) / sailboat^{2} \\). Hence a solution of (1) with \\( wallpaper<teardrop \\) must have \\( wallpaper<e \\), so \\( wallpaper=1 \\) or 2. If \\( wallpaper=1 \\), there are no values of \\( teardrop>1 \\) which satisfy (1). If \\( wallpaper=2 \\), then \\( teardrop=4 \\) is the unique solution of (1) with \\( teardrop>2 \\). Thus \\( wallpaper=2, teardrop=4 \\) is the only solution of the given equation in positive integers with \\( wallpaper<teardrop \\). Clearly, there is just one other solution in positive integers with \\( wallpaper \\neq teardrop \\), namely, \\( wallpaper=4, teardrop=2 \\).\n\nIn the original equation neither \\( wallpaper \\) nor \\( teardrop \\) can be zero, since \\( 0^{teardrop}=teardrop^{0} \\) has no non-zero solution \\( teardrop \\). If \\( wallpaper \\) is negative, say \\( wallpaper=-blueberry \\), and \\( teardrop \\) is positive, the requirement becomes \\( (-blueberry)^{teardrop}=1 / teardrop^{blueberry} \\). But this has no positive integral solution \\( teardrop \\), since the left member would be an integer but the right would not, unless \\( teardrop=1 \\), in which case the left member is negative.\n\nIf both \\( wallpaper \\) and \\( teardrop \\) are negative, say \\( wallpaper=-blueberry, teardrop=-raincloud \\), then \\( (-blueberry)^{-1}=(-raincloud)^{blueberry} \\) giving\n\\[\n(-1)^{\\prime}=(-1)^{blueberry} \\quad \\text { and } \\quad blueberry^{\\prime}=raincloud^{blueberry}\n\\]\nwith \\( blueberry \\) and \\( raincloud \\) unequal positive integers. As we have seen, this implies \\( blueberry=2 \\), \\( raincloud=4 \\), or vice versa. Both of these solutions satisfy the sign condition.\n\nThus there are four solutions to the original equation in unequal integers:\n\\[\n(wallpaper, teardrop)=(2,4),(4,2),(-2,-4),(-4,-2) .\n\\]\n\nThe problem is related to Problem A.M. 1 of the Twelfth Competition. It has attracted the attention of mathematicians at least since the eighteenth century. In Solomon Hurwitz, \"On the Rational Solutions of \\( wallpaper^{teardrop}=teardrop^{wallpaper} \\) with \\( wallpaper \\neq teardrop \\),\" American Mathematical Monthly, vol. 74 (1967), pages 298–300, it is shown that all rational solutions of the equation with \\( |wallpaper|>|teardrop| \\) are given by\n\\[\nwallpaper=\\left(1+\\frac{1}{paintbrush}\\right)^{paintbrush+1} \\quad teardrop=\\left(1+\\frac{1}{paintbrush}\\right)^{paintbrush}\n\\]\nwhere \\( paintbrush \\) is a positive integer, and\n\\[\nwallpaper=-\\left(1+\\frac{1}{paintbrush}\\right)^{paintbrush+1} \\quad teardrop=-\\left(1+\\frac{1}{paintbrush}\\right)^{paintbrush}\n\\]\nwhere \\( paintbrush \\) is a negative odd integer."
    },
    "descriptive_long_misleading": {
      "map": {
        "m": "fractional",
        "n": "constant",
        "x": "fixedvalue",
        "k": "negativenum",
        "l": "zerovalue",
        "s": "irrational"
      },
      "question": "1. Find all solutions of \\( constant^{fractional}=fractional^{constant} \\) in integers \\( constant \\) and \\( fractional(fixedvalue \\neq fractional) \\). Prove that you have obtained all of them.",
      "solution": "Solution. First we consider positive integer solutions. Then the given equation is equivalent to\n\\[\n\\frac{1}{fractional} \\log fractional=\\frac{1}{constant} \\log constant .\n\\]\n\nThe function \\( (\\log fixedvalue) / fixedvalue \\) is strictly increasing for \\( 0<fixedvalue \\leq e \\) and strictly decreasing for \\( e \\leq fixedvalue \\), as we see by considering its derivative \\( (1-\\log fixedvalue) / fixedvalue^{2} \\). Hence a solution of (1) with \\( fractional<constant \\) must have \\( fractional<e \\), so \\( fractional=1 \\) or 2 . If \\( fractional=1 \\), there are no values of \\( constant>1 \\) which satisfy (1). If \\( fractional=2 \\), then \\( constant=4 \\) is the unique solution of (1) with \\( constant>2 \\). Thus \\( fractional=2, constant=4 \\) is the only solution of the given equation in positive integers with \\( fractional<constant \\). Clearly, there is just one other solution in positive integers with \\( fractional \\neq constant \\), namely, \\( fractional=4, constant=2 \\).\n\nIn the original equation neither \\( fractional \\) nor \\( constant \\) can be zero, since \\( 0^{constant}=constant^{0} \\) has no non-zero solution \\( constant \\). If \\( fractional \\) is negative, say \\( fractional=-negativenum \\), and \\( constant \\) is positive, the requirement becomes \\( (-negativenum)^{constant}=1 / constant^{negativenum} \\). But this has no positive integral solution \\( constant \\), since the left member would be an integer but the right would not, unless \\( constant=1 \\), in which case the left member is negative.\n\nIf both \\( fractional \\) and \\( constant \\) are negative, say \\( fractional=-negativenum, constant=-zerovalue \\), then \\( (-negativenum)^{-1}= (-zerovalue)^{negativenum} \\) giving\n\\[\n(-1)^{\\prime}=(-1)^{negativenum} \\quad \\text { and } \\quad negativenum^{\\prime}=zerovalue^{negativenum}\n\\]\nwith \\( negativenum \\) and \\( zerovalue \\) unequal positive integers. As we have seen, this implies \\( negativenum=2, zerovalue=4 \\), or vice versa. Both of these solutions satisfy the sign condition.\n\nThus there are four solutions to the original equation in unequal integers:\n\\[\n(fractional, constant)=(2,4),(4,2),(-2,-4),(-4,-2) .\n\\]\n\nThe problem is related to Problem A.M. 1 of the Twelfth Competition. It has attracted the attention of mathematicians at least since the eighteenth century. In Solomon Hurwitz, \"On the Rational Solutions of \\( fractional^{constant}=constant^{fractional} \\) with \\( fractional \\neq constant \\),\" American Mathematical Monthly, vol. 74 (1967), pages 298-300, it is shown that all rational solutions of the equation with \\( |fractional|>|constant| \\) are given by\n\\[\nfractional=\\left(1+\\frac{1}{irrational}\\right)^{irrational+1} \\quad constant=\\left(1+\\frac{1}{irrational}\\right)^{irrational}\n\\]\nwhere \\( irrational \\) is a positive integer, and\n\\[\nfractional=-\\left(1+\\frac{1}{irrational}\\right)^{irrational+1} \\quad constant=-\\left(1+\\frac{1}{irrational}\\right)^{irrational}\n\\]\nwhere \\( irrational \\) is a negative odd integer."
    },
    "garbled_string": {
      "map": {
        "m": "qzxwvtnp",
        "n": "hjgrksla",
        "x": "plmnzyqr",
        "k": "sdfghjkl",
        "l": "rtyuioop",
        "s": "vbnmxcvb"
      },
      "question": "1. Find all solutions of \\( hjgrksla^{qzxwvtnp}=qzxwvtnp^{hjgrksla} \\) in integers \\( hjgrksla \\) and \\( qzxwvtnp(plmnzyqr \\neq qzxwvtnp) \\). Prove that you have obtained all of them.",
      "solution": "Solution. First we consider positive integer solutions. Then the given equation is equivalent to\n\\[\n\\frac{1}{qzxwvtnp} \\log qzxwvtnp=\\frac{1}{hjgrksla} \\log hjgrksla .\n\\]\n\nThe function \\( (\\log plmnzyqr) / plmnzyqr \\) is strictly increasing for \\( 0<plmnzyqr \\leq e \\) and strictly decreasing for \\( e \\leq plmnzyqr \\), as we see by considering its derivative \\( (1-\\log plmnzyqr) / plmnzyqr^{2} \\). Hence a solution of (1) with \\( qzxwvtnp<hjgrksla \\) must have \\( qzxwvtnp<e \\), so \\( qzxwvtnp=1 \\) or 2 . If \\( qzxwvtnp=1 \\), there are no values of \\( hjgrksla>1 \\) which satisfy (1). If \\( qzxwvtnp=2 \\), then \\( hjgrksla=4 \\) is the unique solution of (1) with \\( hjgrksla>2 \\). Thus \\( qzxwvtnp=2, hjgrksla=4 \\) is the only solution of the given equation in positive integers with \\( qzxwvtnp<hjgrksla \\). Clearly, there is just one other solution in positive integers with \\( qzxwvtnp \\neq hjgrksla \\), namely, \\( qzxwvtnp=4, hjgrksla=2 \\).\n\nIn the original equation neither \\( qzxwvtnp \\) nor \\( hjgrksla \\) can be zero, since \\( 0^{hjgrksla}=hjgrksla^{0} \\) has no non-zero solution \\( hjgrksla \\). If \\( qzxwvtnp \\) is negative, say \\( qzxwvtnp=-sdfghjkl \\), and \\( hjgrksla \\) is positive, the requirement becomes \\( (-sdfghjkl)^{hjgrksla}=1 / hjgrksla^{sdfghjkl} \\). But this has no positive integral solution \\( hjgrksla \\), since the left member would be an integer but the right would not, unless \\( hjgrksla=1 \\), in which case the left member is negative.\n\nIf both \\( qzxwvtnp \\) and \\( hjgrksla \\) are negative, say \\( qzxwvtnp=-sdfghjkl, hjgrksla=-rtyuioop \\), then \\( (-sdfghjkl)^{-1}= (-rtyuioop)^{sdfghjkl} \\) giving\n\\[\n(-1)^{\\prime}=(-1)^{sdfghjkl} \\quad \\text { and } \\quad sdfghjkl^{\\prime}=rtyuioop^{sdfghjkl}\n\\]\nwith \\( sdfghjkl \\) and \\( rtyuioop \\) unequal positive integers. As we have seen, this implies \\( sdfghjkl=2 \\), \\( rtyuioop=4 \\), or vice versa. Both of these solutions satisfy the sign condition.\n\nThus there are four solutions to the original equation in unequal integers:\n\\[\n(qzxwvtnp, hjgrksla)=(2,4),(4,2),(-2,-4),(-4,-2) .\n\\]\n\nThe problem is related to Problem A.M. 1 of the Twelfth Competition. It has attracted the attention of mathematicians at least since the eighteenth century. In Solomon Hurwitz, \"On the Rational Solutions of \\( qzxwvtnp^{hjgrksla}=hjgrksla^{qzxwvtnp} \\) with \\( qzxwvtnp \\neq hjgrksla \\),\" American Mathematical Monthly, vol. 74 (1967), pages 298-300, it is shown that all rational solutions of the equation with \\( |qzxwvtnp|>|hjgrksla| \\) are given by\n\\[\nqzxwvtnp=\\left(1+\\frac{1}{vbnmxcvb}\\right)^{vbnmxcvb+1} \\quad hjgrksla=\\left(1+\\frac{1}{vbnmxcvb}\\right)^{vbnmxcvb}\n\\]\nwhere \\( vbnmxcvb \\) is a positive integer, and\n\\[\nqzxwvtnp=-\\left(1+\\frac{1}{vbnmxcvb}\\right)^{vbnmxcvb+1} \\quad hjgrksla=-\\left(1+\\frac{1}{vbnmxcvb}\\right)^{vbnmxcvb}\n\\]\nwhere \\( vbnmxcvb \\) is a negative odd integer."
    },
    "kernel_variant": {
      "question": "Find all ordered pairs of distinct non-zero integers (m,n) that satisfy\n\\[\n m^{\\,n}=n^{\\,m}\\quad\\text{and}\\quad m+n\\equiv0\\pmod 6.\\tag{\\*}\n\\]",
      "solution": "Solution.  We seek all distinct nonzero integers m,n with\n\n    (i)  m^n = n^m,    and    (ii)  m+n ≡ 0 (mod 6).\n\n1.  The positive–integer case.\nAssume first m,n>0 and m≠n.  Then taking natural logarithms gives\n\n    n·ln m = m·ln n\n⇒  (ln m)/m = (ln n)/n.\n\nDefine f(x)= (ln x)/x for x>0.  Then\n\n    f′(x) = (1−ln x)/x^2,\nso f′>0 on (0,e) and f′<0 on (e,∞).  Thus f is strictly increasing on (0,e] and strictly decreasing on [e,∞).  Consequently if f(m)=f(n) with m≠n, one of m,n lies below e and the other above e.  Since the only positive integers below e≈2.718… are 1 and 2, we must have\n\n    {n,m} ∩ {1,2} ≠ ∅  and  the other ≥3.\n\nCase A.  n=1<n<m.  Then f(1)=0 so f(m)=0 ⇒ ln m=0 ⇒ m=1, contradicting n<m.  No solution.\n\nCase B.  n=2< m.  Then f(2)=(ln 2)/2.  On [e,∞) f is strictly decreasing from f(e)=1/e down to 0 as x→∞, so the equation f(x)=f(2) has exactly two solutions: x=2 and x=4.  Since m>n=2 we get m=4.  Thus the only positive solution with n<m is (n,m)=(2,4).  By symmetry also (m,n)=(4,2) works.\n\nHence the only distinct positive solutions are\n\n    (m,n)=(2,4)\nand\n    (m,n)=(4,2).\n\n2.  Mixed-sign case.\nSuppose one of m,n is positive, the other negative.  If m>0>n then\n\n    m^n = 1/m^{|n|}\n\nis a non-integer rational (unless m=1, but then 1^n=1≠n^1 if n<0), while\n\n    n^m = (−|n|)^m\n\nis an integer.  Contradiction.  The case n>0>m is analogous.  No mixed-sign solutions.\n\n3.  Both negative.\nWrite m=−k, n=−ℓ with k,ℓ>0.  Then\n\n    m^n = (−k)^{−ℓ} = 1/((−k)^ℓ) = (−1)^ℓ / k^ℓ,\n    n^m = (−ℓ)^{−k} = (−1)^k / ℓ^k.\n\nEquating gives\n\n    (−1)^ℓ / k^ℓ   =   (−1)^k / ℓ^k\n⇒  (−1)^ℓ ℓ^k = (−1)^k k^ℓ,\n\nso in particular |k^ℓ| = |ℓ^k| and (−1)^ℓ = (−1)^k.  Thus k^ℓ=ℓ^k and k,ℓ have the same parity.  But from the positive-case analysis the only unequal positive integer solutions of k^ℓ=ℓ^k are k=2,ℓ=4 or k=4,ℓ=2, both even.  Hence\n\n    (k,ℓ) = (2,4) or (4,2)\n\ngives negative solutions\n\n    (m,n) = (−2,−4) and (−4,−2).\n\n4.  The modulus condition.\nIn all four pairs,\n\n    2+4=6≡0 mod 6,    and    (−2)+(−4)=−6≡0 mod 6.\n\n5.  Conclusion.\nThe complete set of distinct nonzero integer solutions of m^n=n^m satisfying m+n≡0 mod 6 is\n\n    (m,n) ∈ { (2,4), (4,2), (−2,−4), (−4,−2) }.\n\nNo other pairs meet both conditions.",
      "_meta": {
        "core_steps": [
          "Log-linearize: n^m = m^n  ⇒  log m / m = log n / n (m,n≠0).",
          "Study f(x)=log x / x : derivative (1−log x)/x² ⇒ f ↑ on (0,e] and ↓ on [e,∞) (unimodal with peak at x=e).",
          "Thus for distinct positive integers equality demands one < e < the other; only m=2 (or n=2) works, giving (2,4) and (4,2).",
          "Exclude 0 and mixed signs (integrality / parity issues); both negative reduce to k^l = l^k, yielding (−2,−4) and (−4,−2)."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Choice of logarithm base in f(x)=log x / x; any base >1 preserves unimodality and the critical point x=e.",
            "original": "natural logarithm (base e)"
          },
          "slot2": {
            "description": "Orientation convention that the argument starts with the smaller of {m,n}; reversing to assume n<m leaves the reasoning intact.",
            "original": "assume m < n"
          },
          "slot3": {
            "description": "Order in which sign cases (positive, zero/mixed, both negative) are analyzed; rearranging this order does not affect the logical chain.",
            "original": "positive case handled first, others afterward"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}