OFFSET
1,1
COMMENTS
The case where 10^n has the same digits as 1^n is excluded by no leading zeros constraint.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..105
EXAMPLE
12^2 = 144 - the same digits as 21^2 = 441.
5^3 = 125 - the same digits as 8^3 = 512.
4^4 = 256 - the same digits as 5^4 = 625.
348^5 = 5103830227968 - the same digits as 381^5 = 8028323765901.
PROG
(Python)
from collections import Counter
def key(n):
c = Counter(str(n))
return tuple(c[i] for i in "0123456789")
def a(n):
j, jn, jkey, repeated = 1, 1, key(1), []
while not repeated:
d, ub = dict(), 10**(sum(jkey))
while jn <= ub:
if jkey not in d: d[jkey] = j
else: repeated.append(d[jkey])
j += 1
jn = j**n
jkey = key(jn)
return min(repeated)
print([a(n) for n in range(1, 25)]) # Michael S. Branicky, Dec 12 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Tanya Khovanova, Oct 10 2007
EXTENSIONS
a(6)-a(34) from Donovan Johnson, Apr 22 2008
a(35)-a(39) from Chai Wah Wu, Jun 01 2020
a(1) from Chai Wah Wu, Jun 02 2020
STATUS
approved