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 A238508 #11 May 22 2025 10:21:37 %S A238508 0,5,13,50,213,536,536,4582,63202,163984 %N A238508 Smallest number m such that 3^m contains a string of n consecutive decreasing integers in its decimal representation. %e A238508 5 is the smallest exponent such that 3^5 contains two consecutive decreasing integers (3^5 = 243). %e A238508 13 is the smallest exponent such that 3^13 contains three consecutive decreasing integers (3^13 = 1594323). %o A238508 (Python) %o A238508 def StrDec(x): %o A238508 for n in range(10**5): %o A238508 count = 0 %o A238508 i = 0 %o A238508 string = str(3**n) %o A238508 if len(string) == x and x == 1: %o A238508 return n %o A238508 while i < len(string)-1: %o A238508 if int(string[i]) == int(string[i+1])-1: %o A238508 count += 1 %o A238508 i += 1 %o A238508 else: %o A238508 if count >= x-1: %o A238508 return n %o A238508 else: %o A238508 count = 0 %o A238508 i += 1 %o A238508 if count >= x-1: %o A238508 return n %o A238508 x = 1 %o A238508 while x < 15: %o A238508 print(StrDec(x)) %o A238508 x += 1 %Y A238508 Cf. A238449, A215727. %K A238508 nonn,base,fini,full %O A238508 1,2 %A A238508 _Derek Orr_, Feb 27 2014 %E A238508 a(9)-a(10) from _Giovanni Resta_, Mar 02 2014