I'm looking for some $f(x)$ that has the following property:

$\sum_{x=1}^\infty f(kx) = r^k$

for some real $0 < r < 1$, and at least for strictly positive integer $k$.

Does such an $f(x)$ exist?

This could also be thought of in terms of some sequence of real numbers $f[n]$.

I posted this at MSE but got no answer, so thought I would try MO.