OFFSET
3,1
LINKS
Jean-Marc Rebert, Table of n, a(n) for n = 3..1000
EXAMPLE
a(3) = 32, because 32^3 = 32768 begins with 32, and no lesser number k > 2 and not a power of 10 has this property.
PROG
(PARI) a(n) = my(k=2); while(!((v = strsplit(Str(k^n), Str(k))) && (#v >= 2) && (v[1] == "")), k++; if (sumdigits(k)==1, k++)); k; \\ Michel Marcus, Apr 11 2023
(Python)
from itertools import count
def a(n): return next(k for k in count(2) if (s:=str(k)).strip("0")!="1" and str(k**n).startswith(s))
print([a(n) for n in range(3, 75)]) # Michael S. Branicky, Apr 11 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jean-Marc Rebert, Apr 11 2023
STATUS
approved