Ramanujan’s identity $A^A+B^B+C^C$= $P^P+Q^Q+R^R$. 
Recently I had visited S. Ramanujan’s house in Kumbakonam which has now been converted to a museum. There , came across the above given display card having identities involving integers having the same exponents as the digits themselves. Is there a concrete method to arrive at such identities or is it just by brute force that one arrives at them?
 A: Let $p_n$ be the sequence of all primes (preferably in ascending order). Every integer $k$ can uniquely expressed as a product $k = p_1^{k_1} \cdot p_2^{k_2} \cdot \ldots$, where the $k_i$ are nonnegative integers ($k_i$ is the $p_i$-adic valuation of $k$), and most of the $k_i$ are zero. Let's call $(k_i)$ the valuation sequence of $k$.
Now note that if $c = a \cdot b$, then $c_i = a_i + b_i$ for all $i$. So products of integers correspond to sums of their valuation sequences.
Now let's list the valuation sequences of numbers of the form $n^n$:
$1^1$ corresponds to $(0, 0, 0, \ldots)$,
$2^2$ corresponds to $(2, 0, 0, \ldots)$,
$3^3$ corresponds to $(0, 3, 0, \ldots)$,
$4^4$ corresponds to $(8, 0, 0, \ldots)$,
$5^5$ corresponds to $(0, 0, 5, \ldots)$,
$6^6$ corresponds to $(6, 6, 0, \ldots)$,
and so on. Now finding a product identity is simply a matter of finding matching integer linear combinations of the valuation sequences. There's bound to be a lot of them, since the dimension of the vector space spanned by the valuation sequences of $1^1, \ldots, n^n$ is equal to the number of primes between $1$ and $n$, and that's a lot less than $n$.
The first identity can be found like this:
$$(0, 0, 0, \ldots) + (0, 0, 0, \ldots) + (2, 0, 0, \ldots) + (6, 6, 0, \ldots) = (0, 3, 0, \ldots) + (0, 3, 0, \ldots) + (8, 0, 0, \ldots),$$
therefore 
$$ 1^1 \cdot 1^1 \cdot 2^2 \cdot 6^6 = 3^3 \cdot 3^3 \cdot 4^4.$$
