This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238449 Smallest numbers m such that 2^m contains a string of n consecutive decreasing integers in its decimal representation. 1
 0, 5, 25, 78, 161, 341, 1315, 28238, 56047, 283789 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS This is an increasing sequence (not necessarily strictly increasing). LINKS EXAMPLE 5 is the smallest exponent such that 2^5 contains two consecutive decreasing integers (2^5 = 32). 25 is the smallest exponent such that 2^25 contains three consecutive decreasing integers (2^25 = 33554432). MATHEMATICA 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 *) PROG (Python) def StrDec(x): ..for n in range(10**5): ....count = 0 ....i = 0 ....if len(str(2**n)) == x and x == 1: ......return n ....while i < len(str(2**n))-1: ......if int(str(2**n)[i]) == int(str(2**n)[i+1])-1: ........count += 1 ........i += 1 ......else: ........if count == x-1: ..........return n ........else: ..........count = 0 ..........i += 1 ....if count == x-1: ......return n x = 1 while x < 50: ..print(StrDec(x)) ..x += 1 CROSSREFS Cf. A045875, A238448. Sequence in context: A301912 A171272 A243303 * A062989 A122679 A264132 Adjacent sequences:  A238446 A238447 A238448 * A238450 A238451 A238452 KEYWORD nonn,base,fini,full AUTHOR Derek Orr, Feb 26 2014 EXTENSIONS a(8)-a(10) from Giovanni Resta, Feb 26 2014 STATUS approved

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

Last modified May 27 02:54 EDT 2019. Contains 323597 sequences. (Running on oeis4.)