>>573 Python
import time, itertools
def f573(n):
  t = time.clock()
  ans = []
  q = [i**n for i in range(10)]
  cwr = itertools.combinations_with_replacement
  for p in cwr(range(10), n):
    s = sum(q[d] for d in p)
    if len(str(s)) == n and s == sum(q[int(c)] for c in str(s)):
      ans.append(s)
  ans.sort()
  print "n=%d -> %s %f" % (n, str(ans), time.clock() - t)

for n in [3,4,5,6,7,8]:
  f573(n)

n=3 -> [153, 370, 371, 407] 0.000000
n=4 -> [1634, 8208, 9474] 0.000000
n=5 -> [54748, 92727, 93084] 0.016000
n=6 -> [548834] 0.031000
n=7 -> [1741725, 4210818, 9800817, 9926315] 0.078000
n=8 -> [24678050, 24678051, 88593477] 0.172000