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.

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

This page as a plain text file.
%I A243304 #49 Apr 21 2024 23:54:42
%S A243304 1,5,13,50,213,536,536,536,9354,63202,117150,1314904,2572181,2572181
%N A243304 Least number k > 0 such that 3^k contains at least an n-digit long substring of the infinite string "98765432109876543210987654...".
%C A243304 a(n+1) >= a(n) for all n.
%C A243304 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
%C A243304 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
%e A243304 3^5 = 243 contains a 2-digit substring of the infinite string "98765432109876543210987654..." (in this case, "43"). So a(2) = 5.
%o A243304 (Python)
%o A243304 def Rev(n):
%o A243304   rev = ''
%o A243304   for i in str(n):
%o A243304     rev = i + rev
%o A243304   return rev
%o A243304 def a(n):
%o A243304   lst = []
%o A243304   for b in range(1,10**n):
%o A243304     if len(str(3**b)) >= n:
%o A243304       lst.append(b)
%o A243304       break
%o A243304   for k in range(lst[0],50000):
%o A243304     for i in range(10):
%o A243304       s = ''
%o A243304       s += str(i)
%o A243304       for j in range(i+1,i+n):
%o A243304         dig = j%10
%o A243304         s+=str(dig)
%o A243304       if str(3**k).find(Rev(s)) > -1:
%o A243304         return k
%o A243304 n = 1
%o A243304 while n < 100:
%o A243304   print(a(n),end=', ')
%o A243304   n += 1
%Y A243304 Cf. A243295.
%K A243304 nonn,base,more,hard,less
%O A243304 1,2
%A A243304 _Derek Orr_, Jun 04 2014
%E A243304 a(10)-a(12) from _Hiroaki Yamanouchi_, Sep 26 2014
%E A243304 a(13)-a(14) from _Delbert L. Johnson_, Apr 13 2024