6. A sequence is recursively defined as: $t_{1}=1$, for $n>1$, when $n$ is even, $t_{n}=1+t_{\frac{n}{2}}$; when $n$ is odd, $t_{n}=\frac{1}{t_{n} \cdot 1}$. If it is known that $t_{n}=\frac{19}{87}$, then the sum of the digits of $n$ is
A. 15
B. 17
C. 19
D. 21
E. 23
6. From the problem, we know that when $n$ is even, $t_{n}=1+t_{\frac{n}{2}}>1$, thus for odd terms, $t_{n}=\frac{1}{t_{n-1}}<1$. Therefore, $\frac{19}{87}$ is an odd term. Its previous term is $\frac{87}{19}$. Notice that $\frac{87}{19} \rightarrow 1+\frac{68}{19} \rightarrow 1+1+\frac{49}{19} \rightarrow 1+1+1+\frac{30}{19} \rightarrow 1+1+1+1+\frac{11}{19}$;
$\frac{11}{19}$ is an odd term, so its previous term is $\frac{19}{11}$. Notice that
$$
\frac{19}{11} \rightarrow 1+\frac{8}{11}, \frac{11}{8} \rightarrow 1+\frac{3}{8}, \frac{8}{3} \rightarrow 1+\frac{5}{3} \rightarrow 1+1+\frac{2}{3}, \frac{3}{2} \rightarrow 1+\frac{1}{2}.
$$

And $\frac{1}{2}$ is exactly the 3rd term. Tracing back, we know:
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline Number $t_{n}$ & $\frac{1}{2}$ & $\frac{3}{2}$ & $\frac{2}{3}$ & $\frac{5}{3}$ & $\frac{8}{3}$ & $\frac{3}{8}$ & $\frac{11}{8}$ & $\frac{8}{11}$ & $\frac{19}{11}$ & $\frac{11}{19}$ & $\frac{30}{19}$ & $\frac{49}{19}$ & $\frac{68}{19}$ & $\frac{87}{19}$ & $\frac{19}{87}$ \\
\hline Term number $n$ & 3 & 6 & 7 & 14 & 28 & 29 & 58 & 59 & 118 & 119 & 238 & 476 & 952 & 1904 & 1905 \\
\hline
\end{tabular}

Therefore, $n=1905$, and the sum of its digits is 15. So the answer is A.