Find all pairs of unequal integers a, b such that a^b = b^a.

(In reply to

answer by K Sengupta)

At the outset, since a and b are not equal, we cannot have a=b=0.

If a = 0, but b is non zero, then the lhs is 0, while the rhs is 1, which is a contradiction. In a similar manner, we cannot have b=0, for non zero a.

Accordingly, each of a and b must be non zero.

*Case A: Both a and b are positive.*

Let us assume that a> b, so that a = b + k, for some

positive integer k.

Then, we have:

(b+k)^b = b^(b+k)

or, (1 + K/b)^b = b^k

Now, we know that:

e^y = 1 + y + (y^2)/2! + .....

Accordingly, for y > 1 we must have:

e^y > 1+y

Therefore, it follows that:

b^k = (1 +k/b)^b < e^k

or, b < e = 2.7182...(since k is a positive integer)

Thus, b = 1, 2

If b=1, then 1+k = 1, giving k=0, so that a=b, which is a

contradiction.

If b=2, then we have a = 2^(a/2).

For the lhs of this equation to be a positive integer, it follows that

a/2 must be a positive integer

so that a = 2c, for some positive integer c.

Now, for c > 2, we have:

2^c > 2c, which is a contradiction.

Thus, c=1,2

c=1 gives a=2, so that a=b, which is a contradiction.

c=2 gives a=4.

Thus, (a,b) = (4,2) is the only positive integer solution with the

restriction a> b. Since the given equation is symmetric in a and b, it follows that (a, b) is the only possible solution with the

restriction a< b.

*Case B: a is positive, b is negative*

Here a > 0 and b<0. So, b= -c for some positive integer c.

Thus, we must have:

a^(-c) = (-c)^a

or, (a^c)*(-c)^a = 1

Thus, a divides 1,so that a = 1.

However, a must be even for the rhs of the above equation to be

positive. Since a is odd, this leads to a contradiction.

*Case C: Both a and b are negative*

Let (a, b)= (-c, -d), where both c and d are positive.

Then, from the given equation, we have:

(-c)^(-d) = (-d)^(-c)

or, (-d)^c = (-c)^d

or, d^c = c^d, whenever both of c and d are odd, or both of c

and d are even.

In terms of Case A, we observe that (c,d) = (2,4), (4,2) are in

conformity with the former consideration with no possible solution for the latter consideration.

This, gives, (a,b) = (-2, -4), (-4, -2)

Consequently, (a,b) = (2, 4), (4, 2), (-2, -4), (-4, -2) are the

only possible solutions to the given problem.