# Trigonometry and Polynomials?

**Algebra**Level 5

For every positive integer \(n, \cos (nx)\) can be written as a polynomial in \(\cos (x)\) with integral coefficients. We call it \(P_{n}(y)\) where \(y=\cos (x)\). For example, we have \(P_{1}(y)=y, P_{2}(y)=2y^{2}-1\).

Denote \(S (n)\) to be the sum of absolute values of the coefficients of \(P_{n}(y)\). For example, \(S(1)=1, S (2)=3\).

Find the smallest positive value of \(A\) such that for all integers \(n> 0\),

\[ S(n) \equiv S(n+A) \pmod{100}. \]