So let the three 3 colours be R, B and G,
R B R B
B R B R
and so on, while the R and B can switch spots => 2 ways
Since 3 colours must be painted at least once, we must find more cases like above
since this applies to any 2 colours, there are 3C2 ways to choose the colours
hence: total ways =...