1,2

D. Mondot, Table of n, a(n) for n = 1..32699

a(2) = 12 since 9^12 = 282429536481 is the smallest power of 9 that begins with 2.

(Python)

def a(n):

s, k = str(n), 0

while not str(9**k).startswith(s): k += 1

return k

print([a(n) for n in range(1, 74)]) # Michael S. Branicky, Dec 09 2021

Cf. A001019, A018869.

Sequence in context: A299515 A326927 A338289 * A327470 A068614 A163920

Adjacent sequences: A018867 A018868 A018869 * A018871 A018872 A018873

nonn,base

David W. Wilson

approved