6. A total of 2015 tickets, numbered $1,2,3,4, \ldots, 2014,2015$, are placed in an empty bag. Alfie removes ticket $a$ from the bag. Bernice then removes ticket $b$ from the bag. Finally, Charlie removes ticket $c$ from the bag. They notice that $a<b<c$ and $a+b+c=2018$. In how many ways could this happen?
6. We want to determine the number of triples $(a, b, c)$ of positive integers that satisfy the conditions $1 \leq aa+a+a=3 a$.
Since $a+b+c=2018$ and $3 ab+b$ and so $2017>2 b$, which gives $bb+b$ and so $2015>2 b$, which gives $bb+b$ and so $2017-2 k>2 b$, which gives $bb+b$ and so $2016>2 b$, which gives $bb+b$ and so $2018-2 m>2 b$, which gives $b<1009-m$.
Since $b$ is an integer, then $b \leq 1008-m$.
Therefore, $b$ can take the values in the range $2 m+1 \leq b \leq 1008-m$.
For each $b$, there is a corresponding $c$ (namely, $c=2018-2 m-b$ ).
Note that we need to have $2 m+1 \leq 1008-m$ or $3 m \leq 1007$ and so $m \leq 335 \frac{2}{3}$; since $m$ is an integer, we thus need $m \leq 335$.
Since there are $(1008-m)-(2 m+1)+1=1008-3 m$ values of $b$ in this range, then there are $1008-3 m$ triples in this case.
Since $a \leq 672$, then the largest even permissible value of $a$ is $a=672$ which gives $2 m=672$ or $m=336$. From above, we know further that $m \leq 335$.
Thus, $m$ takes the integer values from $m=1$ (which gives $a=2$ ) to $m=335$ (which gives $a=670)$, inclusive.
The number of triples in these cases range from 1005 (when $m=1$ ) to 3 (when $m=335$ ). The number of triples decreases by 3 when the value of $m$ increases by 1 .
Therefore, when $a$ is even, there are $1005+1002+999+\cdots+6+3$ triples that satisfy the conditions.
Finally, the total number of triples that satisfy the given conditions is thus the sum of
$$
1007+1004+1001+\cdots+8+5+2
$$
and
$$
1005+1002+999+\cdots+6+3+0
$$

The first series is an arithmetic series with first term 1007, last term 2, and including 336 terms in total. (This is because the values of $k$ are from 0 to 335 , inclusive.)
One way to determine the sum of an arithmetic series is to multiply the number of terms by one-half and then multiply by the sum of the first and last terms.
Thus, the sum of this series is $\frac{336}{2}(1007+2)$.
The second series is an arithmetic series with first term 1005, last term 0 , and including 336 terms in total. (This is because the values of $m$ are from 1 to 336 , inclusive.)
Thus, its sum is $\frac{335}{2}(1005+3)$.
Therefore, the total number of triples is
$$
\frac{336}{2}(1007+2)+\frac{335}{2}(1005+3)=168(1009)+335(504)=338352
$$
ANSWER: 338352