1

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$.

  • What is the background of the problem? Is it from a book or class? If so, then what theorems or previously solved problems that led up to this problem do you think might be relevant. Please edit your query in response; that is, please do not respond with a comment. Further, re avoiding no clue questions, please also edit your query to show a good faith attempt to solve the problem, regardless of whether your attempt succeeds. – user2661923 Jan 04 '21 at 11:49
  • 1
    $\gcd(15,2001)=3$ – Jaap Scherphuis Jan 04 '21 at 13:48
  • This question isn't a duplicate as indicated. – Joffan Jan 07 '21 at 15:03

1 Answers1

-1

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$.

Joffan
  • 39,627
  • @user866070 you have adjusted your solution, but it is still incorrect (low). As I alluded to earlier, you are including a lot of multiples of 21 in the numbers inferred by both $k$ and $l$ sets, so reducing the total more than you should. – Joffan Jan 05 '21 at 23:24
  • You're still low. Look at my last point: count the values coprime to 42 up to value 42 and then multiply up by the number of 42-sized blocks, which is 1008/42 = 24. – Joffan Jan 06 '21 at 21:42
  • Any number that is coprime to all of 2016's prime factors is also coprime to 2016, and 42 contains all of 2016's prime factors. So the repeating pattern of numbers coprime to 42 will give you a way to count a small number directly and multiply it up by 24, since 24$\times$42 = 1008. – Joffan Jan 07 '21 at 15:02
  • Once you understand the concepts, you should really look up (Euler's totient function)[https://en.wikipedia.org/wiki/Euler%27s_totient_function], see how it works, and calculate $\phi(2016)/2$ – Joffan Jan 07 '21 at 16:00
  • Thank you very much! I have updated my solution above. – user866070 Jan 07 '21 at 23:01