3  [ Coloring $\quad]$

Tom Sawyer has taken on the task of painting a very long fence, adhering to the condition: any two boards, between which there are exactly two, exactly three, or exactly five boards, must be painted in different colors. What is the minimum number of paints Tom will need for this job?
Two colors (let's say white and red) are not enough: painting board number 1 in white, Tom will be forced to paint boards with numbers 4, 5, and 7 in red. Then between the red boards numbered 4 and 7, there will be exactly two boards, which violates the condition.

Three colors are sufficient: Tom can paint three boards in a row white, then three boards blue, then three red, then three white again, and so on. In this way, between identically painted boards, there will be either no more than one board (if they are in the same triplet) or no fewer than six (if they are in different triplets), so the condition of the problem will be met.

## Answer

3 colors.