Friday 31 March 2023

Digitally Balanced Numbers

I've recently made a post about Balanced Numbers on March 24th 2023. Shortly, I'll turn 27027 days old and 27027 is a balanced number because to the left and right of the zero, the sum of the digits is the same:$$ 27027 = \overbrace{27}^{2+7=9} \cdot 0 \cdot \overbrace{27}^{2+7=9} \text{ is a balanced number}$$On the other hand, a digititally balanced number in base \(b\) is a number in which all the digits \(0, 1, 2, \dots , (b-1) \) occur an equal number of times. The number associated with my diurnal age today is 27025 and this number is digitally balanced in base 6, being equal to 325041.$$27025_{10}=325041_6 \text{ is digitally balanced in base 6}$$This property qualifies it for membership in OEIS A049357:


 A049357

Digitally balanced numbers in base 6: equal numbers of 0's, 1's, ..., 5's.    



The smallest such number will be \(102345_6 = 8345_{10} \) and the largest, with each digit occurring once, is \(543210_6 = 44790_{10}\). There are 600 digitally balanced numbers in this range so I won't list them all here but I'll provide a permalink to generate these numbers using SageMathCell. Numbers Aplenty provides a list of the first 600 digitally balanced numbers in any base. The same source illustrates the smallest 3 × 3 magic square made of consecutive balanced numbers in any base and which corresponds to which corresponds to the nine consecutive numbers 14924, 14917, 14922, 14919, 14921, 14923, 14920, 14925, and 14918. See Figure 1.

Figure 1: source

I must confess to having given digitally balanced numbers scant attention over the years, even though Numbers Aplenty regularly lists their occurrence. Numbers can be digitally balanced in more than one base. Below is a list of numbers that are digitally balanced in bases 2 and 4 (permalink):

Base 2    Base 10     Base 4

10000111 --> 135 --> 2013
10001101 --> 141 --> 2031
10010011 --> 147 --> 2103
10011100 --> 156 --> 2130
10110001 --> 177 --> 2301
10110100 --> 180 --> 2310
11000110 --> 198 --> 3012
11001001 --> 201 --> 3021
11010010 --> 210 --> 3102
11011000 --> 216 --> 3120
11100001 --> 225 --> 3201
11100100 --> 228 --> 3210

The algorithm listed earlier is easily  modified to accommodate other bases. For example, in base 7, the smallest number will be
\(1023456_7=123717_{10}\) and the largest, with each digit occurring once, will be \(6543210_7= 800667_{10}\). There are 4320 numbers in the range and they form part of OEIS A049358 (permalink):


 A049358

Digitally balanced numbers in base 7: equal numbers of 0's, 1's, ..., 6's.         
  


There is an overlap between digitally balanced numbers and pandigital numbers. When the digits in a digitally balanced number occur only once, then it is a pandigital number because its digits span all the possible digits in the number base. So \(27025_{10}=325041_6\) is pandigital in base 6 as well as being digitally balanced in that base.

No comments:

Post a Comment