# Number of ways of arranging 7 coloured blocks in patterns

The question goes:

Given you have 7 differently coloured blocks (red, orange, yellow, green, blue, indigo, violet), how many different arrangements are there such that the blue and green are not to be together, when the blocks are arranged in the pattern:

I have gotten this far, yielding an incorrect answer:

Ext. cycle of 6, with 1 block inside. Ways for G&B to be adjacent on cycle: $2!4!$, for one to be in the middle $2\times 5!$. Total possible arrangements: pick the middle and arrange the outside ($_{}^{7}C_1\times 5!$). So the number of ways is $7\times 5! - (2!4! + 2\times 5!) = 552$.

The answer given in the book is 2160. Why is it correct, and how may it be justified?

• Choose a square for B. . . . . $6$ ways.
• Choose a square for G. . . . . $3$ ways
• Place the other $5$ blocks. . . . .$5!$ ways.
Answer, $3\times6\times5!=2160$.
Taking your approach, it seems to me that you are attempting to count things in the right way, but your actual numbers are wrong. It should be $7!-(6\times2\times5!+2\times6\times5!)$ which is also $2160$.