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.

Original entry on oeis.org

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, 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, 9, 7, 21, 15, 8, 21, 18, 9
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Essentially the same as A062524.

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ StringPosition[ ToString[7^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a
  • Python
    def A063570(n):
        m, k, s = 1, 7, str(n)
        while s not in str(k):
            m += 1
            k *= 7
        return m # Chai Wah Wu, Nov 14 2019