Need help in generating particular sequence (0001000100010001...) using trigonometric functions formula (e.a. "cos").
For example, the formula for sequence 0101010101... is: $f(x)=\cos(\pi x/2).$ For sequence 001001001001001.... The formula is: $f(x)=(2/3)(\cos(2\pi x/3)+1/2).$
Thanks for any help that can lead to problem solution.
Milovan
Correcting your first example, we have $$\left\{\cos\left(\frac{\pi x}{2}\right)\right\}=(0,-1,0,1,0,-1,0,1,\ldots)\ .$$ Hence $$\left\{\cos^2\left(\frac{\pi x}{2}\right)\right\}=(0,1,0,1,0,1,0,1,\ldots)\ .$$ Add these two sequences and divide by $2$.