The largest such m is n. To show that m≥n, we take xj=cos2n+1(2n+1−j)π(j=1,…,2n). It is apparent that −1<x1<⋯<x2n<1. The sum of the lengths of the intervals can be interpreted as −j=1∑2n((−1)2n+1−jxj)2k−1=−j=1∑2n(cos(2n+1−j)(π+2n+1π))2k−1=−j=1∑2n(cos2n+12π(n+1)j)2k−1. For ζ=e2πi(n+1)/(2n+1), this becomes =−j=1∑2n(2ζj+ζ−j)2k−1=−22k−11j=1∑2nl=0∑2k−1(l2k−1)ζj(2k−1−2l)=−22k−11l=0∑2k−1(l2k−1)(−1)=1, using the fact that ζ2k−1−2l is a \emph{nontrivial} root of unity of order dividing 2n+1. To show that m≤n, we use the following lemma. We say that a multiset {x1,…,xm} of complex numbers is \emph{inverse-free} if there are no two indices 1≤i≤j≤m such that xi+xj=0; this implies in particular that 0 does not occur. \begin{lemma*} Let {x1,…,xm},{y1,…,yn} be two inverse-free multisets of complex numbers such that i=1∑mxi2k−1=i=1∑nyi2k−1(k=1,…,max{m,n}). Then these two multisets are equal. \end{lemma*} \begin{proof} We may assume without loss of generality that m≤n. Form the rational functions f(z)=i=1∑m1−xi2z2xiz,g(z)=i=1∑n1−yi2z2yiz; both f(z) and g(z) have total pole order at most 2n. Meanwhile, by expanding in power series around z=0, we see that f(z)−g(z) is divisible by z2n+1. Consequently, the two series are equal. However, we can uniquely recover the multiset {x1,…,xm} from f(z): f has poles at {1/x12,…,1/xm2} and the residue of the pole at z=1/xi2 uniquely determines both xi (i.e., its sign) and its multiplicity. Similarly, we may recover {y1,…,yn} from g(z), so the two multisets must coincide. \end{proof} Now suppose by way of contradiction that we have an example showing that m≥n+1. We then have 12k−1+i=1∑nx2i−12k−1=i=1∑nx2i2k−1(k=1,…,n+1). By the lemma, this means that the multisets {1,x1,x3,…,x2n−1} and {x2,x4,…,x2n} become equal after removing pairs of inverses until this becomes impossible. However, of the resulting two multisets, the first contains 1 and the second does not, yielding the desired contradiction.