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