cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A018870 9^a(n) is smallest power of 9 beginning with n.

This page as a plain text file.
%I A018870 #12 Dec 09 2021 06:04:55
%S A018870 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,
%T A018870 78,34,12,77,33,11,98,54,10,119,75,53,9,118,96,52,30,8,95,73,51,7,138,
%U A018870 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
%N A018870 9^a(n) is smallest power of 9 beginning with n.
%H A018870 D. Mondot, <a href="/A018870/b018870.txt">Table of n, a(n) for n = 1..32699</a>
%e A018870 a(2) = 12 since 9^12 = 282429536481 is the smallest power of 9 that begins with 2.
%o A018870 (Python)
%o A018870 def a(n):
%o A018870     s, k = str(n), 0
%o A018870     while not str(9**k).startswith(s): k += 1
%o A018870     return k
%o A018870 print([a(n) for n in range(1, 74)]) # _Michael S. Branicky_, Dec 09 2021
%Y A018870 Cf. A001019, A018869.
%K A018870 nonn,base
%O A018870 1,2
%A A018870 _David W. Wilson_