A049361 Digitally balanced numbers in both bases 2 and 3.
572, 678, 684, 8287, 8351, 8367, 8399, 8429, 8435, 8479, 8527, 8539, 8551, 8563, 8569, 8591, 8605, 8615, 8619, 8677, 8819, 8825, 8855, 8903, 8907, 8933, 8945, 8975, 8983, 9017, 9065, 9161, 9295, 9303, 9307, 9309, 9323, 9371, 9387, 9401
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
With[{digMax = 3, termsNumber = 100}, Select[Union @@ Table[(FromDigits[#, 3] &) /@ Select[Permutations[Flatten[Table[Range[0, 2], k]]], #[[1]] > 0 &], {k, 1, digMax}], SameQ @@ DigitCount[#, 2, Range[0, 1]] &][[1 ;; termsNumber]]] (* Amiram Eldar, Feb 15 2024 *)