6. If the sum of the first $n$ terms of the arithmetic sequence $\left\{a_{n}\right\}$ is $S_{n}, S_{6}=36, S_{12}=144$, $S_{6 n}=576$, then $n$ equals ( ).
A. 3
B. 4
C. 5
D. 6
6. B. Since the sum of every consecutive $n$ terms in an arithmetic sequence forms an arithmetic sequence, according to the problem, the sum of the first 6 terms is 36, and the sum of the next 6 terms is 108. According to the properties of an arithmetic sequence, this forms an arithmetic sequence with the first term being 36 and the common difference being 72, thus we can get $n=4$.