OFFSET
1,2
EXAMPLE
The ternary representation of 16 is 121, for which c(0)=0 < c(1)=2 > c(2)=1.
MAPLE
filter:= proc(n) local L, m;
L:= convert(n, base, 3); m:= numboccur(1, L);
numboccur(0, L) < m and numboccur(2, L) < m
end proc:
select(filter, [$1 .. 200]); # Robert Israel, Mar 03 2024
MATHEMATICA
Select[Range[1000], DigitCount[#, 3, 0] < DigitCount[#, 3, 1] > DigitCount[#, 3, 2] &]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 03 2024
STATUS
approved