OFFSET
1,1
LINKS
Chris R. Rehmann, Table of n, a(n) for n = 1..10000
EXAMPLE
The ternary representation of 7 is 21, for which c(0)=0 < c(1)=1 <= c(2)=1. So 7 is in the sequence.
MATHEMATICA
Select[Range[1000], DigitCount[#, 3, 0] < DigitCount[#, 3, 1] <= DigitCount[#, 3, 2] &]
PROG
(MATLAB) nmax = 1000; n = 1:nmax; for k = 1:nmax, c = arrayfun(@(m) sum(dec2base(k, 3)-'0'==m), 0:2); tf(k) = c(1)<c(2) && c(2)<=c(3); end, a = n(tf); % Chris R. Rehmann, Oct 12 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 03 2024
STATUS
approved
