A181986 Digitally balanced numbers: ternary numbers which have the same number of 0's as 1's as 2's.
102, 120, 201, 210, 100122, 100212, 100221, 101022, 101202, 101220, 102012, 102021, 102102, 102120, 102201, 102210, 110022, 110202, 110220, 112002, 112020, 112200, 120012, 120021, 120102, 120120, 120201, 120210, 121002, 121020, 121200, 122001, 122010, 122100
Offset: 1
Examples
100122 is an element because it contains two each of "0" and "1" and "2".
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..2000
Programs
-
Mathematica
Select[FromDigits/@Flatten[Permutations/@Table[PadRight[{},3n,{0,1,2}],{n,2}],1],Mod[IntegerLength[#],3]==0&]//Sort (* Harvey P. Dale, Mar 15 2020 *)
Extensions
More terms from Alois P. Heinz, Apr 05 2012
Comments