login
A378191
a(n) is the number of integer bases >= 2 in which n is digitally balanced.
3
0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0
COMMENTS
A digitally balanced number in base b contains every digit from 0 to b-1 in equal amount.
LINKS
Giovanni Resta, Digitally balanced numbers, Numbers Aplenty, 2013.
FORMULA
a(A378080(n+1)) = 0.
a(A378073(n)) >= 1 for n >= 1.
a(A065963(n)) = n for n >= 1.
EXAMPLE
a(n) = 1 for the first time at n = A065963(1) = 2 = 10_2.
a(n) = 2 for the first time at n = A065963(2) = 135 = 10000111_2 = 2013_4.
a(n) = 3 for the first time at n = A065963(3) = 13575 = 11010100000111_2 = 200121210_3 = 142503_6.
MATHEMATICA
A378191[n_] := Module[{b = 1, c = 0, len}, While[(len = IntegerLength[n, ++b]) >= b, If[Divisible[len, b] && SameQ@@DigitCount[n, b], c++]]; c];
Array[A378191, 100, 0]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Nov 19 2024
STATUS
approved