OFFSET
0,4
EXAMPLE
a(5)=5 because 5^4=625 and {6, 2, 5} is at 5th position among 6 permutations of {2, 5, 6}: {{2, 5, 6}, {2, 6, 5}, {5, 2, 6}, {5, 6, 2}, {6, 2, 5}, {6, 5, 2}}; a(7)=17 because 7^4=2401 and {2, 4, 0, 1} is at 17th position among 24 permutations of {0, 1, 2, 4}: {{0, 1, 2, 4}, {0, 1, 4, 2}, {0, 2, 1, 4}, {0, 2, 4, 1}, {0, 4, 1, 2}, {0, 4, 2, 1}, {1, 0, 2, 4}, {1, 0, 4, 2}, {1, 2, 0, 4}, {1, 2, 4, 0}, {1, 4, 0, 2}, {1, 4, 2, 0}, {2, 0, 1, 4}, {2, 0, 4, 1}, {2, 1, 0, 4}, {2, 1, 4, 0}, {2, 4, 0, 1}, {2, 4, 1, 0}, {4, 0, 1, 2}, {4, 0, 2, 1}, {4, 1, 0, 2}, {4, 1, 2, 0}, {4, 2, 0, 1}, {4, 2, 1, 0}}.
MATHEMATICA
Reap[Do[per=Permutations[Sort[tn=IntegerDigits[n^4]]]; Sow[Position[per, tn]], {n, 0, 100}]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Apr 02 2006
STATUS
approved