human
I found an interesting problem on https://www.codewars.com/kata/55f4e56315a375c1ed000159:
The number 81 has a special property, a certain power of the sum of its digits is equal to 81 (nine squared). Eighty one (81), is the first number in having this property (not considering numbers of one digit). 
The next one, is 512.
Let's see both cases with the details

8 + 1 = 9 and 9^(2) = 81

512 = 5 + 1 + 2 = 8 and 8^(3) = 512

We need to make a function, ```power_sumDigTerm()```, that receives a number ```n``` and may output the ```n-th term``` of this sequence of numbers.
The cases we presented above means that

power_sumDigTerm(1) == 81

power_sumDigTerm(2) == 512

Happy coding!

I tried it in Python, but could not do it. Can you solve it?
assistant
#Here is the Python code you requested.

def power_sumDigTerm(n):
    
    def sum_d(x):
        L = [int(d) for d in str(x)]
        res = 0
        for l in L:
            res = res + l
        return res

    r_list = []
    
    for j in range(2, 50):
        for i in range(7, 100): 
            a = i**j
            if sum_d(a) == i:     
                r_list.append(a)
                r_list = list(set(r_list))
                
    r_list = sorted((r_list))
    return r_list[n-1]