A167819 Numbers with a distinct frequency for each ternary digit.
9, 10, 12, 14, 16, 17, 18, 20, 22, 23, 24, 25, 27, 31, 37, 39, 41, 43, 49, 53, 54, 62, 67, 71, 74, 77, 78, 79, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 122, 124, 125, 130, 131, 133, 134, 148, 149, 151, 152, 157, 158, 160, 161, 162, 164, 168
Offset: 1
Examples
9 = 100_3 is in the sequence, as it has 2 0's, 1 1, and 0 2's. 1 is not in the sequence, as it has the same number (0) of 0's and 2's.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[168],Length[Union[DigitCount[ #,3]]]==3&] (* Zak Seidov, Nov 13 2009 *)
-
PARI
/* In PARI versions < 2.6, define: digits(n,b=10)=local(r);r=[];while(n>0,r=concat([n%b],r);n\=b);r */ is_A167819(n)=local(d=digits(n,3),v=vector(3));for(k=1,#d,v[d[k]+1]++);#Set(v)==3 for(n=1,250,if(is_A167819(n),print1(n",")))
Comments