login
Positive integers that are digitally balanced in some integer base b >= 2.
5

%I #16 Nov 21 2024 09:05:22

%S 2,9,10,11,12,15,19,21,35,37,38,41,42,44,49,50,52,56,75,78,99,108,114,

%T 120,135,139,141,142,147,149,150,153,154,156,163,165,166,169,170,172,

%U 177,178,180,184,195,197,198,201,202,204,209,210,212,216,225,226,228

%N Positive integers that are digitally balanced in some integer base b >= 2.

%C A digitally balanced number in base b contains every digit from 0 to b-1 in equal amount.

%C This is the set of all of the distinct terms in A378000.

%H Paolo Xausa, <a href="/A378073/b378073.txt">Table of n, a(n) for n = 1..10000</a>

%H Giovanni Resta, <a href="https://www.numbersaplenty.com/set/balanced_number/">Digitally balanced numbers</a>, Numbers Aplenty, 2013.

%e 99 is a term because it's a digitally balanced number in base 5 (99 = 12034_5).

%e 135 is a term because it's a digitally balanced number in two bases (135 = 10000111_2 = 2013_4).

%t A378073Q[n_] := Module[{b = 1, len}, While[(len = IntegerLength[n, ++b]) >= b && !(Divisible[len, b] && SameQ @@ DigitCount[n, b])]; len >= b];

%t Select[Range[500], A378073Q]

%Y Cf. A049364, A061845, A065963, A378000, A378080 (complement).

%Y Supersequence of A378104.

%Y Positions of positive terms in A378191.

%K nonn,base

%O 1,1

%A _Paolo Xausa_, Nov 16 2024