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.

A063572 Smallest power of 9 having n in its decimal representation.

This page as a plain text file.
%I A063572 #15 May 04 2021 18:16:37
%S A063572 5,2,3,6,5,4,4,3,2,1,11,15,18,11,6,18,17,19,13,23,9,8,14,21,12,13,26,
%T A063572 28,12,3,8,6,13,24,10,18,12,27,9,27,10,6,9,8,6,14,8,7,9,5,18,16,18,6,
%U A063572 13,35,4,20,13,5,11,4,23,18,12,4,17,8,24,7,22,17,3
%N A063572 Smallest power of 9 having n in its decimal representation.
%C A063572 Variant of A062526. - _R. J. Mathar_, Dec 15 2008
%t A063572 a = {}; Do[k = 1; While[ StringPosition[ ToString[9^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a
%o A063572 (Python)
%o A063572 def a(n):
%o A063572   target, k, pow9 = str(n), 1, 9
%o A063572   while not target in str(pow9): k, pow9 = k+1, pow9*9
%o A063572   return k
%o A063572 print([a(n) for n in range(73)]) # _Michael S. Branicky_, May 02 2021
%K A063572 nonn,base
%O A063572 0,1
%A A063572 _Robert G. Wilson v_, Aug 10 2001
%E A063572 More terms from _Michael S. Branicky_, May 02 2021