OFFSET
1,1
COMMENTS
A digitally balanced number in base b contains every digit from 0 to b-1 in equal amount.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
Giovanni Resta, Digitally balanced numbers, Numbers Aplenty, 2013.
EXAMPLE
135 is a term because it's a digitally balanced number in two bases (135 = 10000111_2 = 2013_4).
The first term that is digitally balanced in three bases is 13575 = 11010100000111_2 = 200121210_3 = 142503_6.
MATHEMATICA
A378104Q[n_] := Module[{b = 1, c = 0, len}, While[(len = IntegerLength[n, ++b]) >= b, If[Divisible[len, b] && SameQ @@ DigitCount[n, b], c++]]; c > 1];
Select[Range[10000], A378104Q]
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Paolo Xausa, Nov 16 2024
STATUS
approved