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.

A063570 Smallest positive power of 7 having n in its decimal representation.

This page as a plain text file.
%I A063570 #7 Nov 14 2019 14:36:34
%S A063570 4,4,4,3,2,7,5,1,5,2,13,6,12,12,19,15,5,6,19,11,12,22,14,7,4,30,11,23,
%T A063570 10,16,14,19,11,16,3,7,9,19,12,17,4,12,27,3,18,21,32,10,8,2,15,17,10,
%U A063570 9,7,21,15,8,21,18,9
%N A063570 Smallest positive power of 7 having n in its decimal representation.
%H A063570 Chai Wah Wu, <a href="/A063570/b063570.txt">Table of n, a(n) for n = 0..10000</a>
%t A063570 a = {}; Do[k = 1; While[ StringPosition[ ToString[7^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a
%o A063570 (Python)
%o A063570 def A063570(n):
%o A063570     m, k, s = 1, 7, str(n)
%o A063570     while s not in str(k):
%o A063570         m += 1
%o A063570         k *= 7
%o A063570     return m # _Chai Wah Wu_, Nov 14 2019
%Y A063570 Essentially the same as A062524.
%K A063570 base,nonn
%O A063570 0,1
%A A063570 _Robert G. Wilson v_, Aug 10 2001