OFFSET
1,2
COMMENTS
"Perfect power of n" here means n^k with k>1. The sequence gives the value of n^k, not the value of k. - N. J. A. Sloane, May 31 2024
FORMULA
a(n) = n^A253600(n).
EXAMPLE
For n=12, 12^2=144 contains digit 1 from n so that a(12) = 144.
MATHEMATICA
seq={}; Do[k=1; Until[ ContainsAny[IntegerDigits[n], IntegerDigits[n^k] ], k++ ]; AppendTo[seq, n^k] , {n, 40}]; seq
PROG
(PARI) a(n) = my(sd = Set(vecsort(digits(n))), k=2); while (#setintersect(sd, Set(vecsort(digits(n^k)))) == 0, k++); n^k; \\ Michel Marcus, May 31 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
James C. McMahon, May 30 2024
STATUS
approved