Question: Find smooth $f(x)$ where $f(x) = 1$ for $x = \pm 1, \pm 5, \pm 9, \ldots$ and $f(x) = -1$ for $x = \pm 3, \pm 7, \pm 11$
Condition: For the purpose of this question, I define smoothness as no sudden changes in the function and its fourier transform is finite in (band)width. For sync, the FT is rect function which has a finite width. I know that a rigorous definition of smoothness is lot more complicated - but please go with my notion for now.
Consider the top two curves in the picture below. The first one is the $\operatorname{sinc}(x) = \dfrac{\sin(\frac{\pi x}{2})}{(\frac{\pi x}{2})}$ function. It is smooth and has finite width in FT domain. It has same values for $\pm1$ and it alternates sign for $\pm3, \pm5$ and so on. But its value does not remain constant going from $\pm1$ to $\pm5$ to $\pm7,\ldots$ as per my Question. So this function doesn't satisfy my requirement.
The second one is a sine function multiplied by sign function. It satisfies the values I need, but since there is an abrupt change at $0$, its fourier transform is infinite in width. Hence this too doesn't satisfy my requirement.
I am looking for functions that are (only for visual example) like in the 3 bottom figures (that I have hand drawn with no particular mathematical accuracy). I am not particular about how the function should look like in between $-1$ to $+1$. It could be totally different looking than what I have shown, as long as it meets the requirements stated in my question (and condition).
