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-1 of 1 results.

A243304 Least number k > 0 such that 3^k contains at least an n-digit long substring of the infinite string "98765432109876543210987654...".

Original entry on oeis.org

1, 5, 13, 50, 213, 536, 536, 536, 9354, 63202, 117150, 1314904, 2572181, 2572181
Offset: 1

Views

Author

Derek Orr, Jun 04 2014

Keywords

Comments

a(n+1) >= a(n) for all n.
Note that this sequence is "..at least an n-digit long substring...", not "..exactly an n-digit long substring...". Thus a(6) = a(7) = a(8) = 536. However, if it were "..exactly an n-digit long substring...", a(6) would be 810 and a(7) would be 1772. - Derek Orr, Sep 26 2014
a(15) > 10^7. If the definition were "exactly an n-digit long" then a(13) would be 4019359. - Delbert L. Johnson, Apr 13 2024

Examples

			3^5 = 243 contains a 2-digit substring of the infinite string "98765432109876543210987654..." (in this case, "43"). So a(2) = 5.
		

Crossrefs

Cf. A243295.

Programs

  • Python
    def Rev(n):
      rev = ''
      for i in str(n):
        rev = i + rev
      return rev
    def a(n):
      lst = []
      for b in range(1,10**n):
        if len(str(3**b)) >= n:
          lst.append(b)
          break
      for k in range(lst[0],50000):
        for i in range(10):
          s = ''
          s += str(i)
          for j in range(i+1,i+n):
            dig = j%10
            s+=str(dig)
          if str(3**k).find(Rev(s)) > -1:
            return k
    n = 1
    while n < 100:
      print(a(n),end=', ')
      n += 1

Extensions

a(10)-a(12) from Hiroaki Yamanouchi, Sep 26 2014
a(13)-a(14) from Delbert L. Johnson, Apr 13 2024
Showing 1-1 of 1 results.