Function for the sequence $0,0,1,0,0,1,...$

167 Views Asked by At

I know the function $1+(-1)^n\over2$ generates the binary sequence, so I was curious about what would generate the "ternary sequence."

1

There are 1 best solutions below

0
On BEST ANSWER

$$ f(n)=\frac{1+2\cos(\frac{2n\pi}{3})}{3} $$