Greatest common divisor 2 
Find all integers m such that $0 < m < 1008$ and $\gcd(m, 2016-m) = 1$.

The following is my solution:
Note that $1 = \gcd(m, 2016-m) = \gcd(m, 2016)$.
Since $2016$ is even and divisible by $3, 7, 9, 21, 63$ and $\gcd(m, 2016) = 1$, so $m$ is odd and $m\neq 3k, 7l$, where $k, l\in \mathbb Z,$ and $k, l$ are odd numbers.
Since $0 < m< 1008,$ we deduce that $1\leq k\leq 335, \ 1\leq l\leq 143$ and $k, l$ are odd.
We set $$A = \{3k|\ k\in\mathbb Z,\ 1\leq k\leq 335,\ k \mbox{ odd}\}$$
and $$B = \{7l|\ l\in\mathbb Z,\ 1\leq l\leq 143,\ l \mbox{ odd}\}.$$
Then, we have $|(A\cup B)\setminus (A\cap B)| = 168 + 72 - 48 = 192.$
On the other hand, from $1$ to $1008$ we have $\frac{1007-1}{2} + 1 = 504$ odd numbers. Combining these data, we conclude that there are $504 -192 -24 = 288$ positive integers $m$.
 A: Commenting on your solution process, I think you are making life a little more difficult than it needs to be in this instance by separating out odd numbers. You also end up with a wrong answer.
Here it makes more sense to simply take the three prime factors of $2016$ - $2,3,$ and $7$ - and count all the multiples of these numbers up to $1008$, and then by subtraction find how many numbers in the range are coprime to $2016$.

*

*It's true here that $\gcd(m, 2016{-}m) = \gcd(m, 2016)$, but as observed it might be worth another line of justification for a well-paved proof. For solving the challenge it's not so important.


*You correctly identify that we need to avoid multiples of $2,3,$ and $7$ in the range


*You miss that you have twice subtracted numbers that are multiples of $3\cdot 7 = 21$, so your solution comes out low.


*It's perhaps easier to leave $1008$ in the range because it will be eliminated anyway as not coprime to $2016$.


*As a hand-worked alternative method of getting the count, you could note that the numbers coprime to $(2,3,7)$ will repeat on a block of $2\cdot3\cdot 7=42$ and in fact that pattern is itself symmetric about $21$.
