A049362 Digitally balanced numbers in bases 2, 3 and 4.
8410815, 8411067, 8411631, 8411871, 8411895, 8412153, 8412855, 8413083, 8413161, 8416095, 8416119, 8416125, 8417133, 8417205, 8418795, 8418999, 8419035, 8419065, 8419743, 8419815, 8420055, 8420217, 8420253, 8427135
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
dbQ[n_, b_] := SameQ @@ DigitCount[n, b, Range[0, b - 1]]; With[{digMax = 3, termsNumber = 24}, Select[Union @@ Table[(FromDigits[#, 4] &) /@ Select[Permutations[Flatten[Table[Range[0, 3], k]]], #[[1]] > 0 &], {k, 1, digMax}], dbQ[#, 2] && dbQ[#, 3] &][[1 ;; termsNumber]]] (* Amiram Eldar, Feb 15 2024 *)
Comments