6. Let the increasing sequence of positive terms $a_{1}, a_{2}, \cdots, a_{n}$ be the simplest proper fractions with a denominator of 60, then $\sum_{i=1}^{n} \cos a_{i} \pi=\quad(\quad$ 
A. 0
B. 8
C. 16
D. 30
6. From $60=2^{2} \times 3 \times 5$, we know that the number of positive integers within 60 that contain the factors $2,3,5$ is
$$
\left[\frac{60}{2}\right]+\left[\frac{60}{3}\right]+\left[\frac{60}{5}\right]-\left[\frac{60}{6}\right]-\left[\frac{60}{10}\right]-\left[\frac{60}{15}\right]+\left[\frac{60}{30}\right]=30+20+12-10-6-4+2=44 \text{ (numbers). }
$$

Therefore, the number of positive integers that are coprime with 60 is $60-44=16$ (numbers), which are:
$1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59$. That is, the sequence has 16 terms, with the numerators sequentially taking the above 16 numbers, and the sum of the numbers at equal distances from the ends is 1, i.e., $a_{i}+a_{17-i}=1$,
resulting in $\sum_{i=1}^{n} \cos a_{i} \pi=\sum_{i=1}^{16} \cos a_{i} \pi=\sum_{i=1}^{8}\left(\cos a_{i} \pi+\cos a_{17-i} \pi\right)$
$=2 \sum_{i=1}^{8} \cos \frac{\left(a_{i}+a_{17-i}\right) \pi}{2} \cos \frac{\left(a_{i}-a_{17-i}\right) \pi}{2}$
$=2 \sum_{i=1}^{8} \cos \frac{\pi}{2} \cos \frac{\left(a_{i}-a_{17-i}\right) \pi}{2}=0$.