OFFSET
2,1
LINKS
FORMULA
a(n) = 1 for all n > 9876543210.
EXAMPLE
a(9) = 4 because 9^4 = 6561 has two digits 6 and 9^1 = 9, 9^2 = 81, 9^3 = 729, all with distinct digits.
PROG
(PARI) a(n) = my(d=digits(n), k=1); while(#d == #Set(d), k++; d=digits(n^k)); k; \\ Michel Marcus, Jul 20 2022
(Python)
def a(n):
k, sk = 1, str(n)
while len(set(sk)) == len(sk): k += 1; sk = str(n**k)
return k
print([a(n) for n in range(2, 102)]) # Michael S. Branicky, Jul 23 2022
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Steven Haye Nicolaij, Jul 19 2022
STATUS
approved