Find the general formula (for the nth term) for the sequence

{5,1,5,1,5,1,...}

assuming the pattern continues.

I've tried a lot of things but can't come up with a solution...it seems innocent enough. It seems like the formula should depend on n being even or odd but I can't get anything to work. A suggestion would be appreciated. Is there a specific way to solve these or are you supposed to just spot the pattern. Thanks.