Problem 119 of Project Euler reads

The number 512 is interesting because it is equal to the sum of its digits raised to some power: 5 + 1 + 2 = 8, and 8^{3}= 512. Another example of a number with this property is 614656 = 28^{4}.

We shall definea_{n}to be thenth term of this sequence and insist that a number must contain at least two digits to have a sum.

You are given thata_{2}= 512 anda_{10}= 614656.

Finda_{30}.