the sequence is a periodic sequence of order 3