|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|