A323626 For any nonnegative real number x, let f(x) be the real number obtained by replacing in the binary expansions of the integer and fractional parts of x each finite run of k consecutive equal bits b with a run of k-(-1)^k consecutive bits b; a(n) is the numerator of f(1/n).
3, 3, 1, 3, 1, 2, 3, 3, 1, 1, 13, 1, 7, 3, 1, 3, 1, 2, 77, 1, 1, 26, 203, 1, 817, 14, 109, 3, 1037, 2, 3, 3, 1, 1, 1297, 1, 20275, 77, 155, 1, 17, 1, 13, 13, 67, 203, 6716227, 1, 421735, 817, 17, 7, 2306997, 109, 55739, 3, 49, 1037, 818712813, 1, 138203853, 3
Offset: 1
Examples
The first terms of the sequence, alongside f(1/n) and the binary representations of 1/n and of f(1/n) with periodic part in parentheses, are: n a(n) f(1/n) bin(1/n) bin(f(1/n)) -- ---- ------- ---------------------- ------------------------ 1 3 3 1.(0) 11.(0) 2 3 3/4 0.1(0) 0.11(0) 3 1 1/5 0.(01) 0.(0011) 4 3 3/16 0.01(0) 0.0011(0) 5 1 1/3 0.(0011) 0.(01) 6 2 2/5 0.0(01) 0.(0110) 7 3 3/7 0.(001) 0.(011) 8 3 3/8 0.001(0) 0.011(0) 9 1 1/17 0.(000111) 0.(00001111) 10 1 1/24 0.0(0011) 0.000(01) 11 13 13/257 0.(0001011101) 0.(0000110011110011) 12 1 1/20 0.00(01) 0.00(0011) 13 7 7/129 0.(000100111011) 0.(00001101111001) 14 3 3/56 0.0(001) 0.000(011) 15 1 1/21 0.(0001) 0.(000011) 16 3 3/64 0.0001(0) 0.000011(0) 17 1 1/9 0.(00001111) 0.(000111) 18 2 2/17 0.0(000111) 0.(00011110) 19 77 77/1025 0.(000011010111100101) 0.(00010011001110110011) 20 1 1/12 0.00(0011) 0.00(01)
Links
- Rémy Sigrist, Representation of f in the half-open interval [0,1)
- Rémy Sigrist, PARI program for A323626
Programs
-
PARI
See Links section.
Formula
a(2^k) = 3 for any k >= 0.
a(2^k-1) = 2-(-1)^k for any k > 0.
Comments