%I #9 Jan 27 2023 19:08:39
%S 1,2,3,4,6,12,18,24,26,27,28,29,31,35,36,40,41,42,45,46,47,48,51,52,
%T 53,54,57,58,59,62,65,66,67,70,71,72,73,76,77,78,79,82,83,84,88,89,93,
%U 95,96,97,98,101,102,103,104,107,108,109,113,114,119,124,126
%N Numbers whose base-5 digits d(m), d(m-1), ... d(0) have #(rises) = #(falls); see Comments.
%C 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 A296697-A296699 partition the natural numbers. See the guide at A296712.
%H Clark Kimberling, <a href="/A296697/b296697.txt">Table of n, a(n) for n = 1..10000</a>
%e The base-5 digits of 126 are 1,0,0,1; here #(rises) = 1 and #(falls) = 1, so 126 is in the sequence.
%t z = 200; b = 5; d[n_] := Sign[Differences[IntegerDigits[n, b]]];
%t Select[Range [z], Count[d[#], -1] == Count[d[#], 1] &] (* A296697 *)
%t Select[Range [z], Count[d[#], -1] < Count[d[#], 1] &] (* A296698 *)
%t Select[Range [z], Count[d[#], -1] > Count[d[#], 1] &] (* A296699 *)
%t Select[Range[130],Total[Sign[Differences[IntegerDigits[#,5]]]]==0&] (* _Harvey P. Dale_, Jul 30 2019 *)
%Y Cf. A296698, A296699, A296712.
%K nonn,base
%O 1,2
%A _Clark Kimberling_, Dec 21 2017