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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pontus von Brömssen, Feb 12 2026
STATUS
approved
