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 A296691 #10 Jan 28 2023 22:08:29 %S A296691 1,2,4,8,10,11,13,15,16,19,20,23,26,28,29,31,35,37,38,40,42,43,45,49, %T A296691 51,52,55,56,58,62,68,71,73,74,77,80,82,83,85,89,91,92,94,96,97,100, %U A296691 101,104,107,109,110,112,116,118,119,121,123,124,126,130,132 %N A296691 Numbers whose base-3 digits d(m), d(m-1), ... d(0) have #(rises) = #(falls); see Comments. %C A296691 A rise is an index i such that d(i) < d(i+1); a fall is an index i such that d(i) > d(i+1). The sequences A296691-A296693 partition the natural numbers. See the guide at A296712. %H A296691 Clark Kimberling, <a href="/A296691/b296691.txt">Table of n, a(n) for n = 1..10000</a> %e A296691 The base-3 digits of 132 are 1,1,2,2,0; here #(rises) = #(falls) = 1, so 132 is in the sequence. %t A296691 z = 200; b = 3; d[n_] := Sign[Differences[IntegerDigits[n, b]]]; %t A296691 Select[Range [z], Count[d[#], -1] == Count[d[#], 1] &] (* A296691 *) %t A296691 Select[Range [z], Count[d[#], -1] < Count[d[#], 1] &] (* A296692 *) %t A296691 Select[Range [z], Count[d[#], -1] > Count[d[#], 1] &] (* A296693 *) %Y A296691 Cf. A296692, A296693, A296712. %K A296691 nonn,base %O A296691 1,2 %A A296691 _Clark Kimberling_, Dec 19 2017