login
Numbers whose base-3 digits d(m), d(m-1), ... d(0) have #(rises) > #(falls); see Comments.
4

%I #10 Jan 28 2023 19:35:15

%S 5,14,17,32,41,44,46,47,50,53,59,86,95,98,113,122,125,127,128,131,134,

%T 136,137,139,140,143,149,152,154,155,158,161,167,176,179,221,248,257,

%U 260,275,284,287,289,290,293,296,302,329,338,341,356,365,368,370,371

%N Numbers whose base-3 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 A296691-A296693 partition the natural numbers. See the guide at A296712.

%H Clark Kimberling, <a href="/A296692/b296692.txt">Table of n, a(n) for n = 1..10000</a>

%e The base-3 digits of 371 are 1,1,1,2,0,2; here #(rises) = 2 and #(falls) = 1, so 371 is in the sequence.

%t z = 200; b = 3; d[n_] := Sign[Differences[IntegerDigits[n, b]]];

%t Select[Range [z], Count[d[#], -1] == Count[d[#], 1] &] (* A296691 *)

%t Select[Range [z], Count[d[#], -1] < Count[d[#], 1] &] (* A296692 *)

%t Select[Range [z], Count[d[#], -1] > Count[d[#], 1] &] (* A296693 *)

%Y Cf. A296691, A296693, A296712.

%K nonn,base

%O 1,1

%A _Clark Kimberling_, Dec 19 2017