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”).

A370853
Numbers m such that c(0) < c(1) < c(2), where c(k) = number of k's in the ternary representation of m.
13
17, 23, 25, 53, 71, 77, 79, 134, 152, 158, 160, 161, 206, 212, 214, 215, 230, 232, 233, 238, 239, 241, 296, 314, 320, 322, 350, 386, 398, 402, 404, 422, 428, 430, 440, 452, 456, 458, 464, 466, 470, 474, 476, 478, 480, 482, 484, 485, 530, 536, 538, 554, 556
OFFSET
1,1
LINKS
EXAMPLE
The ternary representation of 17 is 122, for which c(0)=0 < c(1)=1 < c(2)=2.
MATHEMATICA
Select[Range[1000], DigitCount[#, 3, 0] < DigitCount[#, 3, 1] < DigitCount[#, 3, 2] &]
PROG
(PARI)
check(m) = {my(c0=0, c1=0, c2=0, s=Vec(digits(m, 3)));
for(i=1, length(s), if(s[i]==0, c0+=1, if(s[i]==1, c1+=1, if(s[i]==2, c2+=1, ))));
c0<c1 && c1<c2; } \\ John Tyler Rascoe, Mar 11 2024
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 03 2024
STATUS
approved