Give a general formula for nth element of the sequence 1, 1, 0, 1, 1, 0, 1, 1, 0, ...
I have been trying any combination, but I can't find a solution.
Give a general formula for nth element of the sequence 1, 1, 0, 1, 1, 0, 1, 1, 0, ...
I have been trying any combination, but I can't find a solution.
How about $a_n=\dfrac43\sin^2\left(\dfrac{n\pi}3\right)$?
I think $a_n =1-\frac{1}{3}\left(1+e^{\frac{2i\pi}{3}n}+e^{\frac{4i\pi}{3}n}\right)$ works.
=1-(1/3)(1 + EXP(((COMPLEX(0,2)PI())J8/3)J8)+EXP(((COMPLEX(0,4)PI())J8/3)*J8))
I'm probably writing the formula incorrectly
– M. Carlo Bramini Dec 09 '20 at 18:00If $n$ is divisible by $3$, then $a_n=0$. Otherwise, $a_n=1$.
So, the formula $a_n=\min(n \bmod 3,1)$ should work.