Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

since m,n must be even let m=2a, and n=2b, with a,b>=1

if m^n = n^m is true then

(2a)^(2b) = (2b)^(2a)

2^2b * a^2b = 2^2a * b^2a

since m,n are distinct and a,b are distinct let n>m, b>a

2^(2(b-a)) * a^2b = b^2a

so since b>a, b must also be even

let b=2c

2^(2(2c-a)) * a^4c = (2c)^2a

2^(2(2c-a)) * a^4c = 2^2a * c^2a

2^(2(2c-a)) = 2^(4c-2a) plug in and divide 2^2a

2^(4c-4a) * a^4c = c^2a (1)

Here either c<a, c>a or c=a

if it's the first two then let c+k=a

2^(4k) * a^(4a+4k) = (a-k)^2a (2)

if k is positive

2^(4k) * a^(4a+4k) > a^2a > (a-k)^2a

breaking equality (2) so c<a is false

if k is negative, remember 2c = b > a with that 2c+2k=2a -> 2k>a, but a is positive, so k is positive.

Thus, c=a (giving only 1 possible solution), plugging into (1) and solving gives

2^(4a-4a) * a^4a = a^2a

a^4a = a^2a

a^2a = 1

a = 1.

so m=2, c = 1, b=2, n=4

2^4 = 4^2

There are probably some mistakes though :P



Why do m,n have to be even?


It's true that m and n have to have the same parity, but they could be both odd (in principle).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: