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.

A243303 Least number k > 0 such that 2^k contains an n-digit long substring of the infinite string "98765432109876543210987654...".

This page as a plain text file.
%I A243303 #27 Jul 23 2025 11:20:07
%S A243303 1,5,25,78,161,341,1076,16361,19383,56047,132903,862935,862935,4381548
%N A243303 Least number k > 0 such that 2^k contains an n-digit long substring of the infinite string "98765432109876543210987654...".
%C A243303 a(n+1) >= a(n) for all n.
%e A243303 2^25 = 33554432 contains a 3-digit substring of "98765432109876543210987654..." (in this case, "432"). Since 25 is the lower power to have this property, a(3) = 25.
%o A243303 (Python)
%o A243303 def Rev(n):
%o A243303   rev = ''
%o A243303   for i in str(n):
%o A243303     rev = i + rev
%o A243303   return rev
%o A243303 def a(n):
%o A243303   lst = []
%o A243303   for b in range(1,10**n):
%o A243303     if len(str(2**b)) >= n:
%o A243303       lst.append(b)
%o A243303       break
%o A243303   for k in range(lst[0],50000):
%o A243303     for i in range(10):
%o A243303       s = ''
%o A243303       s += str(i)
%o A243303       for j in range(i+1,i+n):
%o A243303         dig = j%10
%o A243303         s+=str(dig)
%o A243303       if str(2**k).find(Rev(s)) > -1:
%o A243303         return k
%o A243303 n = 1
%o A243303 while n < 100:
%o A243303   print(a(n),end=', ')
%o A243303   n += 1
%Y A243303 Cf. A243150.
%K A243303 nonn,base,hard,more
%O A243303 1,2
%A A243303 _Derek Orr_, Jun 04 2014
%E A243303 a(10)-a(13) from _Hiroaki Yamanouchi_, Sep 26 2014
%E A243303 a(14) from _Chai Wah Wu_, May 29 2020