There is a unique sequence of integers a1,a2,…,a2027 such that
tan2027x=1+a2tan2x+a4tan4x+⋯+a2026tan2026xa1tanx+a3tan3x+a5tan5x+⋯+a2027tan2027x
whenever tan2027x is defined. What is a2027?
-2027
-1
1
2026
2027