OFFSET
1,2
COMMENTS
0^0 is not admitted.
652812 is the first number with two essentially different permutations:
6^1 + 5^8 + 2^5 + 8^6 + 1^2 + 2^2 = 6^2 + 5^8 + 2^1 + 8^6 + 1^5 + 2^2 = 652812.
LINKS
EXAMPLE
One of the permutations of {1,3,6,4} is {6,1,4,3} and 1^6+3^1+6^4+4^3 = 1364.
MAPLE
with(combinat); P:= proc(q) local a, b, c, d, j, k, ok, n;
for n from 1 to q do ok:=1; d:=ilog10(n)+1; a:=convert(n, base, 10); b:=permute(a, d);
for k from 1 to nops(b) do c:=0; for j from 1 to d do
if a[j]=0 and b[k][j]=0 then ok:=0; break; else c:=c+a[j]^b[k][j]; fi; od;
if ok=1 then if c=n then print(n); break; fi; fi; od; od; end: P(10^6);
CROSSREFS
KEYWORD
nonn,base,fini,easy
AUTHOR
Paolo P. Lava, Aug 23 2016
STATUS
approved