Positive lacunary trigonometric series (source code)

= Positive lacunary trigonometric series
{title2=$E_n(f)=\sum_{q^k>n}a_k$}

For an odd <integer> $q\ge3$ and positive summable <coefficients> $a_k$, the <Weierstrass M-test> makes $f(x)=\sum_{k\ge0}a_k\cos(q^kx)$ <continuous>. Its partial sum over $q^k\le n$ is the unique <best uniform approximation> by degree-at-most-$n$ <trigonometric polynomials>, for $n\ge1$. If $Q$ is the first omitted frequency, at $x_j=j\pi/Q$ every omitted cosine equals $(-1)^j$ because all frequency ratios are odd. Thus the tail attains alternating extrema equal to its coefficient sum at $2Q\ge2n+2$ points. The <trigonometric Chebyshev alternation theorem> proves the formula. For $a_k=r^{-k}$, $r>1$, the largest decay exponent is $\log r/\log q$.