login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A018870 9^a(n) is smallest power of 9 beginning with n. 3
0, 12, 9, 7, 5, 4, 3, 2, 1, 21, 42, 20, 19, 40, 18, 17, 60, 16, 59, 15, 80, 14, 101, 57, 13, 78, 34, 12, 77, 33, 11, 98, 54, 10, 119, 75, 53, 9, 118, 96, 52, 30, 8, 95, 73, 51, 7, 138, 94, 72, 50, 28, 6, 115, 93, 71, 49, 27, 5, 114, 92, 70, 48, 26, 4, 135, 113, 91, 69, 47, 25, 3, 134 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(2) = 12 since 9^12 = 282429536481 is the smallest power of 9 that begins with 2.
PROG
(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
CROSSREFS
Sequence in context: A299515 A326927 A338289 * A327470 A068614 A163920
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)