If the Riemann hypothesis holds, then the Mertens function $M(n)\equiv\sum_{x\leq n} \mu(n)$ behaves much like a 1D random walk. This includes the statements that

- $M(n)$ changes sign infinitely often
- $M(n)=O(\sqrt{n})$ (ignoring subleading logarithmic corrections).

It is also believed that 3) $\mu(n)=M(n)-M(n-1)$ "looks random". This seems to be a topic of current research, but is sometimes phrased as the "Mobius randomness law" (Eq 5 here), which says that for functions of low complexity $\xi (n)$

$\sum_{n\leq N} \xi(n) \mu(n) = o(\sum_{n\leq N} |\xi(n)|)$

Some weaker analogue of this conjecture is proved in the linked note.

Now, the Mertens function can be extended to the reals through an integral expression

$$M(x) = \int^{c+\mathrm{i}\infty}_{c-\mathrm{i}\infty } \frac{ds}{2\pi \mathrm{i}} \, \frac{x^s}{s \zeta(s)}\,\,\,\,\, (*)$$

**My question is:** Does anyone know of a function $f:\mathbb{R}\rightarrow \mathbb{R}$, which is a deterministic$\dagger$ combination of known analytic functions (e.g., Eq. $(*)$) and which can also be **proved** to obey conditions 1., 2., and 3. above? Here 3. would mean that $f(n)-f(n-1)$ "looks random" in some sense, e.g., the sense described above. Perhaps there are many examples; if so, what's the simplest? I don't particularly care whether $f(n)$ takes integer values; I just want it to look like a random walk.

**EDITS/ I've updated the wording of this question. There is an obvious set of examples if I merely insist on 1. and 2. I should have emphasized the need for $f(n)-f(n-1)$ to "look random".

$\dagger=$ I want $f$ to be expressible as a deterministic combination of known functions; so I won't accept e.g., a fourier series with randomly chosen coefficients (see Carlo's answer below). Morally, I'm interested in the appearance of randomness from seemingly deterministic expressions (e.g., $(*)$).

4more comments