A370853 Numbers m such that c(0) < c(1) < c(2), where c(k) = number of k's in the ternary representation of m.
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
Examples
The ternary representation of 17 is 122, for which c(0)=0 < c(1)=1 < c(2)=2.
Links
- John Tyler Rascoe, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Range[1000], DigitCount[#, 3, 0] < DigitCount[#, 3, 1] < DigitCount[#, 3, 2] &]
-
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
John Tyler Rascoe, Mar 11 2024