How to approach this question from Thinking Mathematically considering the solution below This is the entire question:

I don't understand " so that the clockwise gap between the first and second pin is the same as..." till the end.
I don't see any gaps.
And why do we use 3 threads with 6 pins and only 1 with 5?
This table is the start of the solution in the book, the input represent the number of threads for various combinations of pins and gap size:

Take first 'Pins' row of 3, according to the image in question, we have 1 gap with 1 thread. But then the author proceeds to fill 1 and 3 under '2' and '3' in 'gap' column, meaning 1 thread and 3 threads.
Why is that? The image says there's 1 gap.
I hope what I'm asking for is clear.
 A: The number of threads used is the greatest common divisor of the number of pins and the size of the gap. It has something to do with modular arithmetic. If you rewrite this in modular arithmetic, you should see some patterns.
For instance, consider six pins. We can denote these pins with numbers $1$ through $6$. If we start at one and add two and keep going, we will get the cycle $\{1,3,5\}$ forever. There is no way for us to get anything else. A simple way of thinking about it is that an odd number plus an even number will always be an odd number. We need to use another cycle, namely $\{2,4,6\}$, to get all the results.
To answer your specific question at the end, the cycles would be $\{1,3,2\}$ for a gap of two and $\{1\};\{2\};\{3\}$.
Edit
A "gap" can be thought of as a step size. A gap of two means that you go from one to three or two to four.
A "thread" can be thought of as a cycle. For six pins, a thread could be something like $\{1,2,3,4,5,6\}$ or $\{1,3,5\}$. The thread will go from $5$ to $1$, and therefore create a cycle.
A "pin" is just a number in a modulus system.
