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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A296860 Numbers k whose base-2 digits d(m), d(m-1), ..., d(0) have #(pits) < #(peaks); see Comments. 4
 18, 34, 36, 50, 66, 68, 72, 73, 74, 82, 98, 100, 114, 130, 132, 136, 137, 138, 144, 145, 146, 147, 148, 162, 164, 194, 196, 200, 201, 202, 210, 226, 228, 242, 258, 260, 264, 265, 266, 272, 273, 274, 275, 276, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A pit is an index i such that d(i-1) > d(i) < d(i+1); a peak is an index i such that d(i-1) < d(i) > d(i+1). The sequences A296858-A296860 partition the natural numbers. See the guides at A296882 and A296712. LINKS Clark Kimberling, Table of n, a(n) for n = 1..10000 EXAMPLE The base-2 digits of 297 are 1, 0, 0, 1, 0, 1, 0, 0, 1; here #(pits) = 1 and #(peaks) = 2, so 297 is in the sequence. MATHEMATICA z = 200; b = 2; d[n_] := Differences[Sign[Differences[IntegerDigits[n, b]]]]; Select[Range [z], Count[d[#], -2] == Count[d[#], 2] &] (* A296858 *) Select[Range [z], Count[d[#], -2] < Count[d[#], 2] &] (* A296859 *) Select[Range [z], Count[d[#], -2] > Count[d[#], 2] &] (* A296860 *) PROG (Python) def cwo(subs, s): # count with overlaps allowed c = i = 0 while i != -1: i = s.find(subs, i) if i != -1: c += 1; i += 1 return c def ok(n): b = bin(n)[2:]; return cwo('101', b) < cwo('010', b) print(list(filter(ok, range(1, 298)))) # Michael S. Branicky, May 11 2021 CROSSREFS Cf. A296882, A296712, A296858, A296859. Sequence in context: A188212 A093478 A214465 * A190150 A347369 A357439 Adjacent sequences: A296857 A296858 A296859 * A296861 A296862 A296863 KEYWORD nonn,base,easy AUTHOR Clark Kimberling, Jan 09 2018 STATUS approved

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.

Last modified September 21 02:47 EDT 2023. Contains 365486 sequences. (Running on oeis4.)