13. For a given positive integer $n(n \geqslant 6)$, the set $A$ consists of the sums of 5 consecutive positive integers not greater than $n$, and the set $B$ consists of the sums of 6 consecutive positive integers not greater than $n$. If the number of elements in the set $A \cap B$ is 2016, determine the maximum value of $n$.
Let the elements of set $A$ be $k+k+1+k+2+k+3+k+4=5 k+10$, and the elements of set $B$ be $l+l+1+l+2+l+3+l+4+l+5=6 l+15$,
Thus, $5 k+10=6 l+15 \Rightarrow 6 l=5(k-1) \Rightarrow 5 \mid l$. Let $l=5 m \Rightarrow k=6 m+1$, then $A \cap B=\{30 m+15 \mid m \geqslant 1,6 m+5 \leqslant n\} \Rightarrow A \cap B$ contains $\left[\frac{n-5}{6}\right]$ elements. Notice that $\left[\frac{n-5}{6}\right]=2016 \Rightarrow 2016 \leqslant \frac{n-5}{6}<2017 \Rightarrow 12101 \leqslant n<12107$, so the maximum value of $n$ is 12106.