# $$-$$Trigonometry $$+$$and $$-$$Polynomials?

Algebra Level 5

This question is a follow up from Joel's problem regarding something very interesting I found.

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

Denote $$s(n)$$ to be the sum of values of the coefficients of $${ P }_{ n }(y)$$. For example, $$s(1)=1,\quad s(2)=1$$

Find the smallest positive integer value of $$A$$ such that for all integers $$n>0$$, $$s(n)$$ and $$s(n+A)$$ are congruent modulo $$1234$$. Input $$A \times 3$$ as your answer.

To avoid ambiguity, assume $$k>0$$ if $$k$$ is a positive integer.

×