login
A393333
Nonnegative integers k such that the Chebyshev distance between the vector of proportions of the digits 0-9 in 2^k and the uniform distribution (1/10, ..., 1/10) sets a new minimum.
4
0, 4, 7, 10, 14, 79, 87, 113, 119, 236, 246, 398, 646, 1022, 1245, 1537, 2440, 2467, 4063, 5003, 5175, 8137, 8695, 10694, 15793, 16549, 17783, 18725, 19010, 19431, 20211, 20900, 27197, 29458, 35503, 45368, 46269, 50150, 58656, 58723, 61743, 62107, 63258, 71498
OFFSET
1,2
COMMENTS
The corresponding sequence for base 3 is finite: 0, 4, 5, 7, 13, 32, 33, 34, 66; this is because the ternary representation of 2^66 = 2^A117306(1) contains equally many 0's, 1's and 2's.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..66 (terms 1..62 from Pontus von Brömssen)
EXAMPLE
| | frequencies f_i of 0-9 in 2^a(n) | max |f_i/d-1/10|
n | a(n) | 0 1 2 3 4 5 6 7 8 9 | (d = A034887(a(n)))
---+------+----------------------------------+---------------------
1 | 0 | 0 1 0 0 0 0 0 0 0 0 | 9/10 = 0.9
2 | 4 | 0 1 0 0 0 0 1 0 0 0 | 2/5 = 0.4
3 | 7 | 0 1 1 0 0 0 0 0 1 0 | 7/30 = 0.233333...
4 | 10 | 1 1 1 0 1 0 0 0 0 0 | 3/20 = 0.15
5 | 14 | 0 1 0 1 1 0 1 0 1 0 | 1/10 = 0.1
6 | 79 | 4 1 1 3 3 2 2 2 4 2 | 1/15 = 0.066666...
7 | 87 | 3 2 4 3 4 4 2 2 1 2 | 17/270 = 0.062962...
8 | 113 | 5 3 3 2 3 5 4 3 2 5 | 3/70 = 0.042857...
9 | 119 | 3 4 3 4 4 3 4 3 3 5 | 7/180 = 0.038888...
10 | 236 | 8 5 7 6 9 6 6 9 9 7 | 11/360 = 0.030555...
PROG
(Python)
from itertools import groupby, count, islice
from gmpy2 import mpq, mpz, digits
def A393333_gen(): # generator of terms
c, m, r = mpq(1), mpz(1), mpq(1, 10)
for k in count(0):
s = sorted(digits(m))
d = len(s)
f = max(max(abs(mpq(len(list(g)), d)-r) for a, g in groupby(s)), r*(len(set(s))<10))
if f < c:
c = f
yield k
m <<= 1
A393333_list = list(islice(A393333_gen(), 15)) # Chai Wah Wu, Feb 17 2026
CROSSREFS
Cf. A027870, A034887, A065712, A065710, A065714-A065719, A065744, A117306, A393331 (Euclidean distance), A393332 (Manhattan distance).
Sequence in context: A393331 A393332 A243909 * A187334 A310698 A310699
KEYWORD
nonn,base
AUTHOR
STATUS
approved