OFFSET
1,1
COMMENTS
When computing f(x), we consider the unique binary representation of x where the fractional part of x does not eventually end with repeating ones.
The function f establishes a self-inverse bijection:
- over the nonnegative real numbers,
- over the nonnegative real numbers in the half-open interval [0,1),
- over the nonnegative rational numbers,
- over the nonnegative rational numbers in the half-open interval [0,1),
- over the nonnegative integers (for any n >= 0, f(n) = A162853(n)).
The function f has only one fixed point: f(0) = 0.
LINKS
Rémy Sigrist, Representation of f in the half-open interval [0,1)
Rémy Sigrist, PARI program for A323626
FORMULA
a(2^k) = 3 for any k >= 0.
a(2^k-1) = 2-(-1)^k for any k > 0.
EXAMPLE
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)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,frac,base
AUTHOR
Rémy Sigrist, Jan 20 2019
STATUS
approved