This is inspired by the comment in Minimum values of the sequence $\{n\sqrt{2}\}$ that, by Kroneckers Approximation Theorem, the fractional part of $n\sqrt{2}$ is dense in $[0, 1]$.

My question is that, given an $x \in [0,1]$, is there an explicit construction of a sequence $(n_k)$ such that $\{n_k\sqrt{2}\} \to x$? In particular, an explicit function of the form $n_k = f(k)$ would be nice.

Replace $\sqrt{2}$ by other irrationals for extra credit.

Is this easier for some particular class of reals?

The continued fraction for $\sqrt{2}$ probably comes into play.