Let $f(x)$ switch between $-1$ and $1$ as together the number of digits after the decimal point is odd or even. Let's see:
$$ f(x) = \left\{ \begin{array}{r|rcccr} 1 & 4^m &< &x& <& 2 \times 4^m\;\;\,\,\\ -1 & 2 \times 4^m &< &x& < &4^{m+1}\end{array} \right.$$ Can we express this as a product of complex exponentials? $$ f(t) = \prod_p p^{it} \text{ or }\prod_{n} n^{it}$$ I believe the answer should be yes, since this is the-log version of Fourier transform on $L^2 (\mathbb{R}^\times, \frac{dx}{x})$ rather than $L^2(\mathbb{R}, dx)$. We could define: $$ \hat{f}(n) = \int_0^\infty \frac{dx}{x} f(x)\, n^{ix} $$ Is it possible to reconstruct $f(x)$ as some kind of infinite product? Is $f(x)$ integrable in this Hilbert space?
The expansion would lead to some kind of infinite sum with powers of $n$ instead of exponents $e^{int}$ such as $f(t) = \sum \hat{f}(n)\, n^{ait}$. How could I get an infinite product? Must I take a logarithm?
I'd like to know a basis for Harmonic analysis on $L^2 (\mathbb{R}^\times, \frac{dx}{x})$ I suspect they're just the powers of $n$, $n^{it}$.
I don't understand your question. Why do you ask for a product ? The $2$-periodization of $sign(t),t \in (-1,1)$ has a Fourier series $$F(t) = \sum_n \sin(\pi n t)\frac{1-\cos(\pi n)}{\pi n}$$ and your function is $$f(x)=F(\log_2(x))= \sum_n \sin(\pi n \log_2(x))\frac{1-\cos(\pi n)}{\pi n}$$ This is the most natural expansion, the one in term of the Fourier/Pontryagin orthonormal basis of $L^2(\Bbb{R}^*_{> 0} / 2^\Bbb{Z})$
The non-natural ones are $$f(x) = F( \log_2(x))=\exp(\frac{i \pi}{2} (F(\log_2(x)) +1))=i\prod_n \exp(i\sin(\pi n \log_2(x))\frac{1-\cos(\pi n)}{2 n})$$
and the Mellin transform $$\int_1^\infty (F(x) +1)x^{-s-1}dx= 2\frac{\eta(s)}{s}, \qquad f(x) =-1+ \frac{1}{2i\pi} \int_{(2)} 2\frac{\eta(s)}{s}(\log_2(x))^sds$$