TITLE: Adding tangents of natural numbers and getting the tangent of another natural number
QUESTION [8 upvotes]: Is it possible to find a set of numbers $(a_i)_{i\leq n} \in \mathbb {(N^{\star})}^n$ and another natural number $b$ such that $$\sum_{i=0}^n \tan a_i = \tan b $$?
In other words, given integral, strictly positive, angles in radians, can their tangents sum up to the tangent of another integer number?
Also, is it possible to have two distinct sets of integers $((a_i)_{i\leq n} \in \mathbb {(N^{\star})}^n$ and $(b_i)_{i\leq m} \in \mathbb {(N^{\star})}^m$ such that $$\sum_{i=0}^n \tan a_i = \sum_{i=0}^m \tan b_i$$ ?

REPLY [4 votes]: Somewhat more generally, suppose $\sum_{j=1}^n c_j \tan(a_j) = 0$ where $c_j$ are nonzero algebraic numbers and $a_j$ are distinct positive rationals.  We can write $a_j = k_j/N$ where $N$ and $k_j$ are positive integers.  Since $\tan(t) = \frac{e^{it} - e^{-it}}{i (e^{it} + e^{-it})} = \frac{e^{2it} - 1}{i (e^{2it} + 1)}$, our equation can be rewritten as
$$ \sum_{j=1}^n c_j \frac{z^{k_j} -1}{z^{k_j}+1} = 0 $$
where $z = e^{2 i/N}$.  Since $e^{2i/N}$ is transcendental, the rational function $\sum_{j=1}^n c_j \frac{z^{k_j} -1}{z^{k_j}+1} $ must be identically 0.
However, if $k_m$ is the maximum of the $k_j$, the term $c_m (z^{k_m} - 1)/(z^{k_m} + 1)$ has a pole at each primitive $k_m$'th root of $-1$, while the other terms do not, so this is impossible.