login
A393331
Nonnegative integers k such that the Euclidean 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, 20, 29, 113, 118, 119, 246, 328, 335, 398, 443, 495, 501, 646, 693, 922, 923, 1022, 1245, 1710, 1763, 2047, 2440, 4963, 5003, 5807, 8137, 8612, 10694, 11040, 12745, 15777, 16191, 18725, 20212, 20900, 25884, 27408, 28309, 35503, 36521, 63258
OFFSET
1,2
COMMENTS
Conjecture: The digit proportions in 2^k can get arbitrarily close to, but not equal to, the uniform distribution. This implies that there are infinitely many terms in this sequence and in the related sequences A393332 and A393333.
The corresponding sequence for base 3 is finite: 0, 4, 5, 7, 13, 22, 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..71 (terms 1..63 from Pontus von Brömssen)
EXAMPLE
| | frequencies f_i of 0-9 in 2^a(n) | Sum (f_i/d-1/10)^2
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 | 20 | 1 1 0 0 1 1 1 1 1 0 | 3/70 = 0.042857...
7 | 29 | 1 1 1 1 0 1 1 1 1 1 | 1/90 = 0.011111...
8 | 113 | 5 3 3 2 3 5 4 3 2 5 | 1/98 = 0.010204...
9 | 118 | 4 2 5 3 3 3 5 2 4 5 | 31/3240 = 0.009567...
10 | 119 | 3 4 3 4 4 3 4 3 3 5 | 11/3240 = 0.003395...
PROG
(Python)
from itertools import groupby, count, islice
from gmpy2 import mpq, mpz, digits
def A393331_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 = sum((mpq(len(list(g)), d)-r)**2 for a, g in groupby(s))+mpq(10-len(set(s)), 100)
if f < c:
c = f
yield k
m <<= 1
A393331_list = list(islice(A393331_gen(), 15)) # Chai Wah Wu, Feb 17 2026
CROSSREFS
Cf. A027870, A034887, A065712, A065710, A065714-A065719, A065744, A117306, A393332 (Manhattan distance), A393333 (Chebyshev distance).
Sequence in context: A310696 A310697 A133497 * A393332 A243909 A393333
KEYWORD
nonn,base
AUTHOR
STATUS
approved