OFFSET
1,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
The base-3 digits of 174 are 2,0,1,1,0; here #(rises) = 1 and #(falls) = 2, so 174 is in the sequence.
MATHEMATICA
z = 200; b = 3; d[n_] := Sign[Differences[IntegerDigits[n, b]]];
Select[Range [z], Count[d[#], -1] == Count[d[#], 1] &] (* A296691 *)
Select[Range [z], Count[d[#], -1] < Count[d[#], 1] &] (* A296692 *)
Select[Range [z], Count[d[#], -1] > Count[d[#], 1] &] (* A296693 *)
rltfQ[n_]:=Module[{d=Differences[IntegerDigits[n, 3]]}, Count[d, _?(#>0&)]<Count[d, _?(#<0&)]]; Select[Range[200], rltfQ] (* Harvey P. Dale, Sep 25 2019 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Dec 19 2017
STATUS
approved