login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A296861
Numbers whose base-3 digits d(m), d(m-1), ..., d(0) have #(pits) = #(peaks); see Comments.
4
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 17, 18, 21, 22, 24, 25, 26, 27, 28, 29, 30, 33, 34, 36, 39, 40, 41, 44, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 66, 67, 68, 69, 70, 72, 75, 76, 78, 79, 80, 81, 82, 83, 85, 86, 89, 90, 96, 97, 99, 102, 103
OFFSET
1,2
COMMENTS
A pit is an index i such that d(i-1) > d(i) < d(i+1); a peak is an index i such that d(i-1) < d(i) > d(i+1). The sequences A296861-A296863 partition the natural numbers. See the guides at A296882 and A296712.
LINKS
EXAMPLE
The base-3 digits of 103 are 1, 0, 2, 1, 1; here #(pits) = 1 and #(peaks) = 1, so 103 is in the sequence.
MATHEMATICA
z = 200; b = 3;
d[n_] := Differences[Sign[Differences[IntegerDigits[n, b]]]];
Select[Range [z], Count[d[#], -2] == Count[d[#], 2] &] (* A296861 *)
Select[Range [z], Count[d[#], -2] < Count[d[#], 2] &] (* A296862 *)
Select[Range [z], Count[d[#], -2] > Count[d[#], 2] &] (* A296863 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Jan 09 2018
STATUS
approved