# can you find easier formula for this squence?

So i have this sequence

$\dfrac{\pi}{3}-k,\dfrac{\pi}{3},\dfrac{\pi}{3}+k,\dfrac{2\pi}{3}-k,\dfrac{2\pi}{3},\dfrac{2\pi}{3}+k,\dfrac{3\pi}{3}-k,\dfrac{3\pi}{3},\dfrac{3\pi}{3}+k,...$

I want to make a formula for this sequence, here is what i made myself for $n>=1$

$ceiling(\dfrac{n}{3})*\dfrac{\pi}{3}+ [(floor(n) \mod 3) - 1]*k$

But i think its too complicated (too long) for this easy sequence.

If it makes it easier, $n$ can start from $0$ or any other index as well. things after $2\pi$ repeat, since its used in polar coordinates and $k$ is constant.

$k = \arctan(\dfrac{\sin(\dfrac{\pi}{3})}{\cos(\dfrac{\pi}{3})+2})$

• It looks like it would be easier to just write it as three sequences. Do you need a single formula? – Michael Burr May 16 '18 at 16:57
• sounds reasonable. I can use 3 formulas as well. so my problem nails down to $ceiling(n/3)*\pi/3$ and $ceiling(n/3)*\pi/3+k$ and $ceiling(n/3)*\pi/3-k$. can i simplify $ceiling(n/3)*\pi/3$ further? – M.kazem Akhgary May 16 '18 at 17:04
• Im asking this question because im not a professional so i thought maybe there is an easier way. but if this is the simplest way possible then im ok with that. thanks alot @MichaelBurr – M.kazem Akhgary May 16 '18 at 17:07
• I also clarified constant $k$ as well. if that helps. @MichaelBurr – M.kazem Akhgary May 16 '18 at 17:17
• Oh, You are right. I dont need to take ceiling anymore if i use 3 formulas. duh! thanks for the answer. if you give an answer i would accept. – M.kazem Akhgary May 16 '18 at 17:26

The first three sequence values are given by: $$\frac{\pi}{3}-k,\frac{\pi}{3},\frac{\pi}{3}+k$$ The second set is given by $$2\frac{\pi}{3}-k,2\frac{\pi}{3},2\frac{\pi}{3}+k$$ The third set is given by: $$3\frac{\pi}{3}-k,3\frac{\pi}{3},3\frac{\pi}{3}+k$$ Within each set of three sequence, the common difference is $k$. Also, for each triple, the value of $\pi$ is multiplied by an incremental integer. Therefore, as one solution, it is possible to write a general term of the sequence as $$a(m,n)=m\frac{\pi}{3}+(n-m-1)k$$ where $m=1,2,3,...$ and $n=m, m+1, m+2$.