

A370866


Positive integers m such that c(0) >= c(1) <= c(2), where c(k) = number of k's in the ternary representation of m.


3



2, 6, 8, 11, 15, 18, 19, 20, 21, 24, 26, 29, 33, 35, 45, 47, 51, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 69, 72, 73, 74, 75, 78, 80, 83, 87, 89, 99, 101, 105, 107, 135, 137, 141, 143, 153, 155, 159, 162, 163, 164, 165, 167, 168, 169, 170, 171, 173, 177, 179
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS



EXAMPLE

The ternary representation of 20 is 202, for which c(0)=1 >= c(1)=0 <= c(2)=2.


MATHEMATICA

Select[Range[1000], DigitCount[#, 3, 0] >= DigitCount[#, 3, 1] <= DigitCount[#, 3, 2] &]


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



