6. The sequence $1,2,1,2,2,1,2,2,2,1,2,2,2,2,1, \ldots$ is formed as follows: write down infinitely many ' 1 's, insert a ' 2 ' between the first and the second ' 1 's, insert two ' 2 's between the second and the third ' 1 's, insert three ' 2 's between the third and the fourth ' 1 's, and so on. If $a_{n}$ denotes the $n$-th term of the sequence, find the value of $a_{1} a_{2}+a_{2} a_{3}+\cdots+a_{2013} a_{2014}$.
(1 mark)
數列 $1,2,1,2,2,1,2,2,2,1,2,2,2,2,1, \ldots$ 的組成方法如下：先寫下無限個 $\ulcorner 1 」$ ，然後在第一個和第二個 $\ulcorner 1$ 」之間插入一個 $\ulcorner 2 」$ ，再在第二個和第三個 $\ulcorner 1$ 之間插入兩個 「2」, 繼而在第三個和第四個 $\ulcorner 1$ 之間插入三個 $\left\ulcorner 2 」\right.$, 如此類推。若 $a_{n}$ 表示數列的第 $n$ 項, 求 $a_{1} a_{2}+a_{2} a_{3}+\cdots+a_{2013} a_{2014}$ 的值。
6. $7806 \quad$
6. As there are no two consecutive 1 's, each term in the sum is either equal to 4 (if both multiplicands are 2 ) or 2 (if the two multiplicands are 1 and 2 ). Note that the positions of the 1 's are $1,3,6,10, \ldots$, the triangular numbers. As the 62 nd triangular number is $\frac{62 \times 63}{2}=1953$ while the 63 rd is $1953+63=2016$, exactly 62 of out the first 2014 terms of the sequence are 1 (and the rest are 2 ).
In other words exactly 123 terms in the sum are 2 while the rest is 4 (the number 123 comes from $62 \times 2-1$, as $a_{1}$ only appears in the term $a_{1} a_{2}$, while each other $a_{i}$ that is equal to 1 appears in two terms, for instance $a_{3}$ appears in both $a_{3} a_{4}$ and $a_{4} a_{5}$ ). It follows that the answer is $4 \times 2013-2 \times 123=7806$.