To expand on the above just by a bit and shed a bit more light,
From your sequence
{2,−1,21,2,−1,21,...}You get:
2=u1=u4=u7=...=u1+3(k−1)=...−1=u2=u5=u8=...=u2+3(k−1)=...21=u3=u6=u9=...=u3+3(k−1)=......for
k∈NNow if
u200=2 THEN there exists a natural number
K such that
1+3(K−1)=200If
u200=−1 THEN there exists a natural number
K such that
2+3(K−1)=200 If
u200=21 THEN there exists a natural number
K such that
3+3(K−1)=200 So your method is sort of a trial and error as you're looking through these possibilities to see which one is satisfied, it is not recommended if the cycle is larger.
If I were to do the question, I would recognise that since the sequence repeats after every 3 terms (every 3rd term is 1/2), then I'd look for the closest number to 200 that is a multiple of 3 - so that would be 201. Meaning
u201=21 so go back one and you get
u200=−1