# How I can prove the following equivalence: $f(x)= 2/(2^{1/x}-1)⇔x=1/k$

Let us consider the function (see http://mathworld.wolfram.com/DevilsStaircase.html):

$$f(x)=∑_{n=1}^{∞}⌊nx⌋/2ⁿ$$ for $x∈(0,1)$, where $⌊nx⌋$ is the floor function.

This function is monotone increasing and continuous at every irrational $x$ but discontinuous at every rational $x$. We know that $$f(1/k)= 2/(2^{k}-1)$$ for all positive integers $k$.

My question is: How I can prove the following equivalence:

$$f(x)= 2/(2^{1/x}-1)⇔x=1/k$$ where $k$ is positive integer.

According to MathWorld,

$$f(x)=\begin{cases} \displaystyle\frac1{2^q-1}+\sum_{m\ge 1}\frac1{2^{\lfloor m/x\rfloor}},&\text{if }x=\frac{p}q\in\Bbb Q\text{ in lowest terms}\\ \displaystyle\sum_{m\ge 1}\frac1{2^{\lfloor m/x\rfloor}},&\text{if }x\in\Bbb R\setminus\Bbb Q\;. \end{cases}\tag{1}$$

Suppose that $x$ is irrational. Then for all $m\in\Bbb Z^+$ we have $$\frac{m}x-1<\left\lfloor\frac{m}x\right\rfloor<\frac{m}x\;,$$

and hence

$$\sum_{m\ge 1}\frac1{2^{m/x}}<f(x)<2\sum_{m\ge 1}\frac1{2^{m/x}}\;.$$

And $$\sum_{m\ge 1}\frac1{2^{m/x}}=\frac{1/2^{1/x}}{1-1/2^{1/x}}=\frac1{2^{1/x}-1}\;,$$

so $$\frac1{2^{1/x}-1}<f(x)<\frac2{2^{1/x}-1}\;.$$

In particular, $f(x)\ne\dfrac2{2^{1/x}-1}$.

Now suppose that $x=\frac{p}q\in\Bbb Q$ in lowest terms. We now have

$$\frac{m}x-1<\left\lfloor\frac{m}x\right\rfloor\le\frac{m}x\;,$$

with equality precisely when $p\mid m$. For $p>1$ it follows that

$$\frac1{2^{1/x}-1}=\sum_{m\ge 1}\frac1{2^{m/x}}<f(x)-\frac1{2^q-1}<2\sum_{m\ge 1}\frac1{2^{m/x}}=\frac2{2^{1/x}-1}$$

and hence that $f(x)>\dfrac2{2^{1/x}-1}$.

I’ve not tried to prove $(1)$, however.