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.

Showing 1-2 of 2 results.

A062521 4^a(n) is smallest nonnegative power of 4 containing the string 'n'.

Original entry on oeis.org

5, 0, 4, 7, 1, 4, 2, 10, 7, 6, 5, 20, 25, 35, 9, 29, 2, 17, 15, 11, 28, 9, 36, 29, 5, 4, 9, 19, 24, 16, 11, 37, 38, 43, 35, 14, 8, 15, 7, 21, 6, 11, 16, 11, 9, 14, 21, 18, 10, 16, 26, 20, 30, 8, 14, 8, 4, 10, 25, 22, 22, 29, 9, 7, 3, 8, 23, 12, 14, 17, 23, 13, 12, 15, 15, 22
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Crossrefs

Cf. A030000. Essentially the same as A063567.

Programs

  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[4^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]

A248018 Least number k > 0 such that n^k contains n*R_n in its decimal representation, or 0 if no such k exists.

Original entry on oeis.org

1, 43, 119, 96, 186, 1740, 6177, 8421, 104191, 0, 946417
Offset: 1

Views

Author

Talha Ali, Sep 29 2014

Keywords

Comments

R_n is the repunit of length n, i.e., R_n = (10^n-1)/9, A002275.
a(10^n) = 0 for all n > 0. - Derek Orr, Sep 29 2014
a(9) > 86000. - Derek Orr, Sep 29 2014
Note that a(2) = A030000(22), and a(3) = A063566(333), and that sequence is also related in a similar way to sequences from A063567 up to A063572. - Michel Marcus, Sep 30 2014

Examples

			a(2) = 43 because 2^43 = 8796093022208 has the string '22' in it and 43 is the smallest power of 2 that produces such a result.
a(3) = 119 because 3^119 = 599003433304810403471059943169868346577158542512617035467 contains the string '333', and 119 is the smallest power of 3 that gives us such a result.
		

Crossrefs

Cf. A002275.

Programs

  • Python
    def a(n):
      s = str(n)
      p = len(s)
      if s.count('1') == 1 and s.count('0') == p - 1:
        return 0
      k = 1
      while not str(n**k).count(n*s):
        k += 1
      return k
    n = 1
    while n < 10:
      print(a(n),end=', ')
      n += 1
    # Derek Orr, Sep 29 2014

Extensions

a(3) and a(5) corrected, a(6)-a(8) added by Derek Orr, Sep 29 2014
a(4) corrected and a(9)-a(11) added by Hiroaki Yamanouchi, Oct 01 2014
Showing 1-2 of 2 results.