# Need any kind of insights about a strange function

The function in question is $$f(x; b) = \sum_{k=0}^\infty \{ b^k x \}\cdot b^{-k}$$ where the base $$b$$ is equal to $$2$$ here. Also, $$x\in [0, 1[$$. The curly brackets denote the fractional part function.

The function $$f$$ seems continuous almost everywhere but nowhere differentiable, and has a fractal look. It satisfies the recursion $$f(x) = 2f(x/2) - x$$. We also have $$f(x) = -x \log_2 x + g(x)$$ with $$g$$ a non-trivial, non-constant function satisfying $$g(x) = 2 g(x/2)$$. The function $$g$$ is pictured below.

Any interesting results about this function is welcome. In particular, I am interested in the proportion $$P(\alpha)$$ of real numbers in $$[0, 1[$$ such that $$f(x) < \alpha$$ for any $$\alpha \in [0, 2[$$. This is the inverse of the percentile distribution, pictured below. But I'm not even sure that the set $$\{ x \in [0, 1[ ; f(x) < \alpha\}$$ is Lebesgue-measurable.

Finally, is the function $$f$$ one-to-one despite the appearance?

$$f(x; b) = \sum_{k=0}^\infty \{ b^k x \}\cdot b^{-k}$$.

Here's a start. I hope someone else can continue it.

Let $$x =\sum_{j=0}^{\infty} c_j b^{-j}$$ where $$0 \le c_j \le b-1$$ and $$c_0 = 0$$.

Then

$$\begin{array}\\ \{ b^k x \} &=\{ b^k \sum_{j=0}^{\infty} c_j b^{-j} \}\\ &=\{ \sum_{j=0}^{\infty} c_j b^{-j+k} \}\\ &=\{ \sum_{j=0}^{k} c_j b^{-j+k}\\ &=\{ \sum_{j=0}^{\infty} c_{j+k} b^{-j} \}\\ &=\sum_{j=0}^{\infty} c_{j+k} b^{-j}\\ &=\sum_{j=0}^{\infty} c_{j+k} b^{-j}\\ \text{so}\\ f(x; b) &= \sum_{k=0}^\infty b^{-k}\{ b^k x \}\\ &= \sum_{k=0}^\infty b^{-k}\sum_{j=0}^{\infty} c_{j+k} b^{-j}\\ &= \sum_{k=0}^\infty \sum_{j=0}^{\infty} c_{j+k} b^{-j-k}\\ &= \sum_{n=0}^\infty c_nb^{-n} \sum_{j=0}^{n} 1\\ &= \sum_{n=0}^\infty (n+1)c_nb^{-n}\\ &= \sum_{n=1}^\infty (n+1)c_nb^{-n}\\ &= \sum_{n=1}^\infty nc_nb^{-n}+\sum_{n=1}^\infty c_nb^{-n}\\ &= \sum_{n=1}^\infty nc_nb^{-n}+x\\ &= g(x; b)+x\\ \end{array}$$

At this stage, I'm not sure what to do, so I'll split the sum into sets of $$n$$ with $$m+1$$ digits, $$0\to b-1, b \to b^2-1, ..., b^m \to b^{m+1}-1$$, so that $$b^m \le n \le b^{m+1}-1$$.

$$\begin{array}\\ g(x; b) &= \sum_{n=1}^\infty nc_nb^{-n}\\ &= \sum_{m=0}^{\infty} \sum_{n=b^m}^{b^{m+1}-1} nc_nb^{-n}\\ &= \sum_{m=0}^{\infty} \sum_{n=0}^{b^{m+1}-b^m-1} (n+b^m)c_{n+b^m}b^{-n-b^m}\\ &= \sum_{m=0}^{\infty} b^{-b^m}\sum_{n=0}^{b^{m+1}-b^m-1} (n+b^m)c_{n+b^m}b^{-n}\\ &= \sum_{m=0}^{\infty} b^{-b^m}\sum_{n=0}^{b^{m+1}-b^m-1} nc_{n+b^m}b^{-n}+\sum_{m=0}^{\infty} b^{-b^m}\sum_{n=0}^{b^{m+1}-b^m-1} b^mc_{n+b^m}b^{-n}\\ &= \sum_{m=0}^{\infty} b^{-b^m}\sum_{n=0}^{b^{m+1}-b^m-1} nc_{n+b^m}b^{-n}+\sum_{m=0}^{\infty} b^{-b^m+m}\sum_{n=0}^{b^{m+1}-b^m-1} c_{n+b^m}b^{-n}\\ &= g_1(x; b)+g_2(x; b)\\ \end{array}$$

I'm not sure what to do here. The inner sums look like they might be written as a fractional part of $$x$$ scaled by a power of $$b$$, but, again, I don't see the best way to do it.

So I'll stop here and hope this is of use to others.