Without loss of generality, assume a <= b
Then b = length(aa) <= length(bb ) = a
So b <= a
But a <= b, so b = a
We therefore need a^a having a digits
Well, the number of digits in a^a = 1 + [a*log(a)], (where [] is the floor function], so we need a-1<= a*log(a) < a
In other words, (a-1)/a <= log(a) < 1 (so a must be less than 10). A quick check in excel finds that only 1, 8 and 9 work.
Final answer: (1,1), (8,8), (9,9)
Edited on April 12, 2013, 7:13 pm