OFFSET
0,1
LINKS
Michel Marcus, Table of n, a(n) for n = 0..10000
FORMULA
A111442(n) = n^a(n).
EXAMPLE
For n=12, a(12)=3 because 12^3=1728 contains all decimal digits of n. Compare to A253600(12)=2 because 12^2=144 contains any digit of n.
MATHEMATICA
seq={}; Do[k=1; Until[ContainsAll[IntegerDigits[n^k], IntegerDigits[n] ], k++]; AppendTo[seq, k] , {n, 0, 80}]; seq
PROG
(Python)
from itertools import count
def a(n):
s = set(str(n))
return next(k for k in count(2) if s <= set(str(n**k)))
print([a(n) for n in range(81)]) # Michael S. Branicky, May 27 2024
(PARI) a(n) = my(k=2, d=Set(digits(n))); while(setintersect(Set(digits(n^k)), d) != d, k++); k; \\ Michel Marcus, Jun 01 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
James C. McMahon, May 27 2024
STATUS
approved