login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243303 Least number k > 0 such that 2^k contains an n-digit long substring of the infinite string "98765432109876543210987654..." 0

%I #23 May 29 2020 19:16:10

%S 1,5,25,78,161,341,1076,16361,19383,56047,132903,862935,862935,4381548

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

%C a(n+1) >= a(n) for all n.

%e 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 (Python)

%o def Rev(n):

%o ..rev = ''

%o ..for i in str(n):

%o ....rev = i + rev

%o ..return rev

%o def a(n):

%o ..lst = []

%o ..for b in range(1,10**n):

%o ....if len(str(2**b)) >= n:

%o ......lst.append(b)

%o ......break

%o ..for k in range(lst[0],50000):

%o ....for i in range(10):

%o ......s = ''

%o ......s += str(i)

%o ......for j in range(i+1,i+n):

%o ........dig = j%10

%o ........s+=str(dig)

%o ......if str(2**k).find(Rev(s)) > -1:

%o ........return k

%o n = 1

%o while n < 100:

%o ..print(a(n),end=', ')

%o ..n += 1

%Y Cf. A243150.

%K nonn,base,hard,more

%O 1,2

%A _Derek Orr_, Jun 04 2014

%E a(10)-a(13) from _Hiroaki Yamanouchi_, Sep 26 2014

%E a(14) from _Chai Wah Wu_, May 29 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)