So what you are saying is ...
For input n = 1,2,3,4,5...
a_n = 1,2,1,2,1,2There are a number of ways you can do this (click on Equations for Links )...
2- n mod(2)
2-[sin^2(\frac{\pi n}{2})]Just a couple that I thought off in my head...
One is discrete, one is continuous