login
A296697
Numbers whose base-5 digits d(m), d(m-1), ... d(0) have #(rises) = #(falls); see Comments.
4
1, 2, 3, 4, 6, 12, 18, 24, 26, 27, 28, 29, 31, 35, 36, 40, 41, 42, 45, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 62, 65, 66, 67, 70, 71, 72, 73, 76, 77, 78, 79, 82, 83, 84, 88, 89, 93, 95, 96, 97, 98, 101, 102, 103, 104, 107, 108, 109, 113, 114, 119, 124, 126
OFFSET
1,2
COMMENTS
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.
LINKS
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