DRAFT ENTRY FOR THE OEIS (not yet submitted) ========================================== The author line must match the name on your OEIS account. Upload b-file.txt (in this folder) as the b-file. It holds all 5504 terms below 2^16. NAME Numbers k such that every decimal digit position of floor(k*2^n/(2^m-1)), n >= 0, is uniformly distributed, where m is the number of binary digits of k. DATA 9, 12, 139, 141, 142, 147, 149, 153, 154, 156, 163, 166, 169, 172, 177, 178, 184, 197, 198, 201, 202, 204, 209, 212, 216, 226, 228, 232, 2079, 2103, 2107, 2109, 2127, 2139, 2141, 2142, 2151, 2157, 2158, 2163, 2166, 2169, 2172, 2191, 2199, 2203, 2206, 2219 OFFSET 1,1 COMMENTS Let r(n) = floor(k*2^n/(2^m-1)). In binary, r(n) consists of the first n bits of the binary expansion of k repeated indefinitely, so r(n+1) = 2*r(n) + (next bit). For each j >= 1 the sequence r(n) mod 10^j is periodic for n >= j, so each digit d has a well-defined frequency f_j(d) as the j-th decimal digit of r(n) counted from the right. k is a term if f_j(d) = 1/10 for all j >= 1 and all d. Let L be the least period of the repeated binary word, P the value of its first L bits, and w = A112765(P) if 4 divides L, w = A112765(P) + 1 + A112765(L) otherwise. Let D + 1/2 be the frequency of the event r(n) mod 2*5^w < 5^w. Theorem: for j > w, f_j(d) = 1/10 + (-1)^d * D/5^(j-w). Hence k is a term if and only if the digit positions 1..w+1 are each uniformly distributed, which is a finite check. If 4 divides L and 5 does not divide P, then w = 0 and D = (zeros - ones)/(2L), so k is a term if and only if the block of L bits contains equally many 0's and 1's. If 5 does not divide L, the terms are exactly the numbers of the previous comment. All 5504 terms below 2^16 are of this kind. The smallest term not of this kind is 530895 = 10000001100111001111_2 (L = 20, 5 divides P). There are 79837 terms below 2^21, of which 581 are not of this kind. The binary expansion of a term contains equally many 0's and 1's (the last decimal digit of r(n) must be odd half the time). All terms below 2^21 have L divisible by 4. Is this true for all terms? If k is not a term and D <> 0, every digit position beyond the w-th is non-uniform, with the deviation from 1/10 decreasing by a factor of exactly 5 per position. The proof uses that 2 is a primitive root modulo every power of 5, together with the observation that the (j+1)-st digit of 2x+b (b = 0 or 1) is even if and only if the j-th digit of x is at most 4. LINKS (b-file) Table of n, a(n) for n = 1..5504 (all terms below 2^16) (optional) Echo families: which repeated bit patterns give level decimal digits, https://sebastianhagemeyer.github.io/showcase/echo/echo-families.pdf (statement and proof of the theorem) EXAMPLE 9 = 1001_2 gives r(n) = 1, 2, 4, 9, 19, 38, 76, 153, 307, ... for n >= 1, which is floor(3*2^n/5). Here L = 4, P = 9, and the block 1001 has two 0's and two 1's, so 9 is a term: every digit position of r(n) takes each of the ten digits with frequency 1/10. 8 = 1000_2 gives r(n) = 1, 2, 4, 8, 17, 34, 68, 136, 273, ... Here w = 0 and D = 1/4, so f_j(d) = 1/10 + (-1)^d/(4*5^j): the last digit is even with frequency 3/4, and 8 is not a term. 153 = 10011001_2 has the same repeated word as 9, so it is also a term. PROG (Python) def v5(x): c = 0 while x % 5 == 0: x //= 5; c += 1 return c def ok(k): b = bin(k)[2:] L = next(p for p in range(1, len(b)+1) if len(b) % p == 0 and b[:p]*(len(b)//p) == b) if 2*b[:L].count("1") != L: return False w = v5(int(b[:L], 2)) + (0 if L % 4 == 0 else 1 + v5(L)) M, x, n = 10**(w+1), 0, 0 for _ in range(L*(w+2)): x = (2*x + int(b[n % L])) % M; n += 1 start, cnt = (x, n % L), [[0]*10 for _ in range(w+1)] while True: y = x for j in range(w+1): cnt[j][y % 10] += 1; y //= 10 x = (2*x + int(b[n % L])) % M; n += 1 if (x, n % L) == start: break return all(len(set(c)) == 1 for c in cnt) print([k for k in range(1, 2220) if ok(k)]) # _Sebastian Richard Hagemeyer_, Dec 02 2026 CROSSREFS Cf. A112765 (5-adic valuation). Cf. A000225 (r(n) for k = 1), A000975 (r(n) for k = 2), A262864 (apparently r(n) for k = 9). KEYWORD nonn,base AUTHOR _Sebastian Richard Hagemeyer_, Dec 02 2026 NOTES FOR YOU (not part of the entry) - The terms are certain. Numbers that are not terms were ruled out by direct computation, and the terms were confirmed two ways: brute force over six digit positions, and the finite test justified by the theorem. - OEIS editors may shorten the comments or ask for the proof. The PDF has it in full. - "A262864 (apparently ...)" rests on its first 16 listed terms matching. An editor may want that checked or dropped. - The name on an OEIS entry is public and permanent.