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.

A238448 Smallest number m such that 2^m contains a string of n consecutive increasing digits in its decimal representation.

This page as a plain text file.
%I A238448 #24 May 22 2025 10:21:37
%S A238448 0,7,28,135,391,992,5837,9485,15975,244178
%N A238448 Smallest number m such that 2^m contains a string of n consecutive increasing digits in its decimal representation.
%C A238448 This is an increasing sequence (but not necessarily strictly increasing).
%e A238448 7 is the smallest exponent such that 2^7 contains two consecutive increasing digits (2^7 = 128).
%e A238448 28 is the smallest exponent such that 2^28 ( = 268435456)  contains three consecutive increasing digits (456).
%e A238448 a(6) = 992 from  2^992 =
%e A238448 418558049682135672245478534789063207250548754572474065407714995457168379_345\
%e A238448     678_17284890561672488119458109166910841919797858872862722356017328064756\
%e A238448     15116630782786940537040715228680107267602488727296075852403533779290461\
%e A238448     69580757764357779904060393635270100437362409630553424235540298930640110\
%e A238448     82834640896 - _N. J. A. Sloane_, Aug 12 2018
%t A238448 a[1]=0; a[n_] := Block[{k = 4, p = 16}, While[Max[ Length /@ Select[ Split@ Differences@ IntegerDigits@p, First@# == 1 &]] < n-1, k++; p *= 2]; k]; a/@ Range[7] (* _Giovanni Resta_, Feb 26 2014 *)
%o A238448 (Python)
%o A238448 def Str(x):
%o A238448   for n in range(10**5):
%o A238448     count = 0
%o A238448     i = 0
%o A238448     if len(str(2**n)) == x and x == 1:
%o A238448       return n
%o A238448     while i < len(str(2**n))-1:
%o A238448       if int(str(2**n)[i]) == int(str(2**n)[i+1])-1:
%o A238448         count += 1
%o A238448         i += 1
%o A238448       else:
%o A238448         if count == x-1:
%o A238448           return n
%o A238448         else:
%o A238448           count = 0
%o A238448           i += 1
%o A238448     if count == x-1:
%o A238448       return n
%o A238448 x = 1
%o A238448 while x < 50:
%o A238448   print(Str(x))
%o A238448   x += 1
%Y A238448 Cf. A045875.
%K A238448 nonn,base,fini,full
%O A238448 1,2
%A A238448 _Derek Orr_, Feb 26 2014
%E A238448 a(8)-a(10) from _Giovanni Resta_, Feb 26 2014
%E A238448 Definition and examples corrected ("integers" changed to "digits") by _N. J. A. Sloane_, Aug 12 2018