6. For the sequence $a_{1}, a_{2}, \cdots, a_{m}$, define the sets
$$
\begin{array}{l}
A=\left\{a_{i} \mid 1 \leqslant i \leqslant m\right\}, \\
B=\left\{a_{i}+2 a_{j} \mid 1 \leqslant i, j \leqslant m, i \neq j\right\} .
\end{array}
$$

Let $n$ be a given integer greater than 2. For all strictly increasing arithmetic sequences $a_{1}, a_{2}, \cdots, a_{n}$ composed of positive integers, find the minimum number of elements in the set $A \triangle B$, where $A \triangle B=(A \cup B) \backslash(A \cap B)$.
6. When $n=3$, the required minimum value is 5; when $n \geqslant 4$, the required minimum value is $2 n$.

First, we prove a lemma.
Lemma When $n \geqslant 4$, for an arithmetic sequence $a_{1}, a_{2}, \cdots, a_{n}$ with common difference $d$, we have
$$
B=\left\{3 a_{1}+k d \mid 1 \leqslant k \leqslant 3 n-4, k \in \mathbf{Z}\right\} .
$$

Proof For any $1 \leqslant i, j \leqslant n, i \neq j$, we have
$$
\begin{array}{l}
a_{i}+2 a_{j}=3 a_{1}+(i-1) d+2(j-1) d \\
=3 a_{1}+(i+2 j-3) d .
\end{array}
$$

And $1 \leqslant i+2 j-3 \leqslant 3 n-4$, hence
$$
B \subseteq\left\{3 a_{1}+k d \mid 1 \leqslant k \leqslant 3 n-4, k \in \mathbf{Z}\right\} \text {. }
$$

On the other hand, for $1 \leqslant k \leqslant 3 n-4$, it can be proven: there exist $1 \leqslant i, j \leqslant n, i \neq j$, such that $i+2 j-3=k$.
(1) When $k \geqslant 2 n-2$, take $i=k+3-2 n$, $j=n$, then $1 \leqslant i \leqslant n-10$.
Clearly, $|A|=n$.
By the lemma,
$$
B=\left\{3 a_{1}+k d \mid 1 \leqslant k \leqslant 3 n-4, k \in \mathbf{Z}\right\} .
$$

Thus, $|B|=3 n-4$.
Also, by $a_{2}=a_{1}+d<3 a_{1}+d$, we know $a_{1}, a_{2}$ do not belong to $B$.
Thus, $|A \cap B| \leqslant n-2$.
Therefore, $|A \triangle B|=|A|+|B|-2|A \cap B|$
$$
\geqslant n+(3 n-4)-2(n-2)=2 n \text {. }
$$

On the other hand, when the arithmetic sequence is $1,3, \cdots, 2 n-1$, we have $A=\{1,3, \cdots, 2 n-1\}$.
And by the lemma, $B=\{5,7, \cdots, 6 n-5\}$, at this time, $|A \triangle B|=2 n$.
When $n=3$, let $a_{1}, a_{2}, a_{3}$ be a strictly increasing arithmetic sequence of positive integers. Then $|A|=3$.
By $2 a_{1}+a_{2}<2 a_{1}+a_{3}<2 a_{3}+a_{1}<2 a_{3}+a_{2}$
$\Rightarrow|B| \geqslant 4$.
Also, by $a_{1}, a_{2}$ not belonging to $B$, we know $|A \cap B| \leqslant 1$.
Therefore, $|A \triangle B| \geqslant 5$.
On the other hand, when $a_{1}=1, a_{2}=3, a_{3}=5$, $A=\{1,3,5\}, B=\{5,7,11,13\}$,
$|A \triangle B|=5$.
Thus, the minimum value of $|A \triangle B|$ is 5.