TITLE: Identities of the form $397612 = 3^2+9^1+7^6+6^7+1^9+2^3$
QUESTION [7 upvotes]: Consider the interesting equality: 
$$397612 = 3^2+9^1+7^6+6^7+1^9+2^3$$
Is there any criterion for an integer number $\displaystyle m$ to satisfy the equality 
$$m=a_1+a_2\times 10^1+...+a_{n-1}\times 10^{n-2}+a_{n}\times 10^{n-1}=a_1^{a_n}+\cdots+a_{n}^{a_1}\quad?$$ 
We assume that $0 \leq a_i \leq 9$ for every $1 \leq i \leq n$ and that $a_n \geq 1$.

REPLY [2 votes]: Not quite the same form, but I like $2^59^2 = 2592$.