6. For any positive integer $n$, define $Z(n)$ as the smallest positive integer $m$ such that $1+2+\cdots+m$ is a multiple of $n$. Regarding the following three propositions:
(1) If $p$ is an odd prime, then $Z(p)=p-1$;
(2) For any positive integer $a$, $Z\left(2^{a}\right)>2^{a}$;
(3) For any positive integer $a$, $Z\left(3^{a}\right)=3^{a}-1$, the true propositions are ( ).
(A) (1)(2)
(B)(1)(3)
(C)(2)(3)
(D)(1)(2)(3)
6. D.

Notice that, $1+2+\cdots+m=\frac{m(m+1)}{2}$.
In proposition (1), from $p \left\lvert\, \frac{m(m+1)}{2}\right.$, we know $2 p \mid m(m+1)$.
Since $p$ is an odd prime, then $p \mid m$ or $p \mid(m+1)$. Therefore, the minimum value of $m$ is $p-1$.
Thus, proposition (1) is correct.
In proposition (2), from $2^{a} \left\lvert\, \frac{m(m+1)}{2}\right.$, we know $2^{a+1} \mid m(m+1)$.
Notice that, $(m, m+1)=1$.
Then $2^{a+1} \mid m$ or $2^{a+1} \mid(m+1)$.
Thus, $Z\left(2^{a}\right)=2^{a+1}-1>2^{a}$.
Therefore, proposition (2) is correct.
In proposition (3), from $3^{a} \left\lvert\, \frac{m(m+1)}{2}\right.$, we know $2 \times 3^{a} \mid m(m+1)$.
Notice that, $2 \mid m(m+1),(2,3)=1$.
Then $2 \times 3^{a}\left|m(m+1) \Leftrightarrow 3^{a}\right| m(m+1)$.
Since $(m, m+1)=1$, thus, $3^{a} \mid m$ or $3^{a} \mid(m+1)$.
Therefore, $Z\left(3^{a}\right)=3^{a}-1$.
Thus, proposition (3) is correct.