If the general term an of sequence {an} is n ^ 2 {cos ^ (n * 180) / 3-sin ^ (n * 180) / 3}, and the sum of the first n terms is Sn, then S30 is?

If the general term an of sequence {an} is n ^ 2 {cos ^ (n * 180) / 3-sin ^ (n * 180) / 3}, and the sum of the first n terms is Sn, then S30 is?

an=n^2{cos^(n*180)/3-sin^(n*180)/3}
=n^2*cos(2n*180)/3
=n^2cos(120n)
a1=1*cos120=-1/2
a2=4cos240=-2
a3=9cos360=9
a4=16cos480=16cos120=-8
a5=25cos600=25cos240=-25/2
I don't know if I understand the topic correctly. It seems that I can't find the rule