OFFSET
1,2
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
The base-5 digits of 126 are 1,0,0,1; here #(rises) = 1 and #(falls) = 1, so 126 is in the sequence.
MATHEMATICA
z = 200; b = 5; d[n_] := Sign[Differences[IntegerDigits[n, b]]];
Select[Range [z], Count[d[#], -1] == Count[d[#], 1] &] (* A296697 *)
Select[Range [z], Count[d[#], -1] < Count[d[#], 1] &] (* A296698 *)
Select[Range [z], Count[d[#], -1] > Count[d[#], 1] &] (* A296699 *)
Select[Range[130], Total[Sign[Differences[IntegerDigits[#, 5]]]]==0&] (* Harvey P. Dale, Jul 30 2019 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Dec 21 2017
STATUS
approved