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.
%I A238449 #8 May 22 2025 10:21:37 %S A238449 0,5,25,78,161,341,1315,28238,56047,283789 %N A238449 Smallest numbers m such that 2^m contains a string of n consecutive decreasing integers in its decimal representation. %C A238449 This is an increasing sequence (not necessarily strictly increasing). %e A238449 5 is the smallest exponent such that 2^5 contains two consecutive decreasing integers (2^5 = 32). %e A238449 25 is the smallest exponent such that 2^25 contains three consecutive decreasing integers (2^25 = 33554432). %t A238449 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 A238449 (Python) %o A238449 def StrDec(x): %o A238449 for n in range(10**5): %o A238449 count = 0 %o A238449 i = 0 %o A238449 if len(str(2**n)) == x and x == 1: %o A238449 return n %o A238449 while i < len(str(2**n))-1: %o A238449 if int(str(2**n)[i]) == int(str(2**n)[i+1])-1: %o A238449 count += 1 %o A238449 i += 1 %o A238449 else: %o A238449 if count == x-1: %o A238449 return n %o A238449 else: %o A238449 count = 0 %o A238449 i += 1 %o A238449 if count == x-1: %o A238449 return n %o A238449 x = 1 %o A238449 while x < 50: %o A238449 print(StrDec(x)) %o A238449 x += 1 %Y A238449 Cf. A045875, A238448. %K A238449 nonn,base,fini,full %O A238449 1,2 %A A238449 _Derek Orr_, Feb 26 2014 %E A238449 a(8)-a(10) from _Giovanni Resta_, Feb 26 2014