Let $f:\mathbb R\to[0,2)$ be a periodic and continuous function. Let $\lfloor x\rfloor$ be the integer part of $x$ when $x\geq 0$. Hence $\lfloor f(n)\rfloor\in\{0,1\}$ when $n\in\mathbb N$.
For any 0-1 sequence $\{a_n\}$ ($n\in\mathbb N$),I wonder whether there exists any $f$ such that $\lfloor f(n)\rfloor=a_n$ when $n\in\mathbb N$.
Here $\mathbb N$ is used to denote $\{0,1,2,\ldots\}$. $\mathbb N^*$ denotes $\mathbb N\setminus \{0\}$.
Some facts:
- When $(a_0,a_1,a_2,a_3,\ldots)=(0,1,1,1,\ldots)$, such $f$ does not exist.
Proof. Suppose that such $f$ exists. The minimum positive period of $f$, denoted by $T$, can not be a rational number.
Let $\pi:\mathbb R\to[0,T), x\mapsto x-T\cdot\left\lfloor\dfrac{x}{T}\right\rfloor$. We know that $\pi(\mathbb N)$ is dense in $[0,T)$. Since $f(\mathbb N^*)\in[1,2)$ and $f$ is continuous, we have $$f(0)\in f([0,T))=f(\overline{\pi(\mathbb N^*)})\subseteq\overline{f(\pi(\mathbb N^*))}=\overline{f(\mathbb N^*)}\subseteq[1,2]$$ which contradicts to $\lfloor f(0)\rfloor=0$.
- When $(a_0,a_1,a_2,a_3,\ldots)=(1,0,0,0,\ldots)$, such $f$ exists, e.g. $f(x)=1-x(\sqrt 2-x)$ when $x\in[0,\sqrt 2)$, $T_f=\sqrt 2$.
- When the sequence is periodic, such $f$ exists.
- The $f$-construable sequences are uncountably infinite, e.g. $f(x)=0.9 \sin(2\pi px)+1$ when $p$ takes all values in $\mathbb R$.