# How many ways are there to paint the seats?

Six seats are arranged in a circular table. Each seat is to be painted in red, blue or green such that any two adjacent seats have different colours. How many ways are there to paint the seats?

I had thought that if you choose a specific seat to start with, say, $a_1$, and WLOG it is red. Then there are two cases: $a_2$ and $a_6$ (chairs adjacent to $a_1$) are both the same colour or are two different colours.

Case 1: $a_2$ is blue and $a_6$ is green. Then if both $a_3$ and $a_5$ are red, $a_4$ has two choices: green or blue. So from this example there are $3 \cdot 2 \cdot 2 = 12$ possible ways.

Case 2: Again, $a_2$ is blue and $a_6$ is green. But if $a_3$ is green and $a_5$ is blue, then $a_4$ must be red. There are $3 \cdot 2$ choices.

Case 3: As before, $a_2$ is blue and $a_6$ is green. But if $a_3$ is red and $a_5$ is blue, then $a_4$ must be green. $3 \cdot 2 \cdot 2 = 12$

So in total I had $12 + 6 + 12 = 30$ ways but the answer was $66$. I do think my reasoning might have some flaws here, but I need help.

• are the seats numbered? Is it the same coloring if I rotate the whole situation? May 26 '18 at 10:08
• You're not considered the second case (a2 and a6 are both the same colour). May 26 '18 at 10:35

Let $c_n$ be the number of valid colorings for $n$ seats and $a_i$ denotes the color of the $i$-th seat. I will make a recursive formula by removing seats. The neighbors of $a_n$ are $a_{n-1}$ and $a_1$.
1. case: If $a_1 \neq a_{n-1}$, then I can remove $a_6$ and obtain a valid coloring for $n-1$ seats.
2. case: If $a_1 = a_{n-1}$, then $a_{n-2} \neq a_{n-1} = a_1$. So I can remove $a_n$ and $a_{n-1}$ and obtain a valid coloring for $n-2$ seats.
Since in the second case there are two options for $a_n$ we have the following recursion $$c_n = c_{n-1} + 2 c_{n-2}$$ There are ways of getting explicit expressions for this, but since we are only interested in $c_6$ we can solve this by follow the recursion. It is easy to check that $c_1 = 0$ and $c_2 = 6$. If you regard $c_1$ as a pathological case, then you can even easily check that $c_3 = 6$. Hence, \begin{align} c_4 &= c_3 + 2 c_2 = 3\cdot 6 = 18, \\ c_5 &= c_4 + 2 c_3 = 5\cdot 6 = 30, \\ c_6 &= c_5 + 2 c_4 = 11\cdot 6 = 66 \end{align}
• — sorry if this should be obvious, but I'm not quite sure why $c_1 = 0$ because if there's one seat, then can't we colour it in 3 ways: red, blue, green? But otherwise it makes sense, so thank you :) May 26 '18 at 12:12
• but the neighbor of $a_1$ is $a_1$ again so you cannot fulfill your condition. However, this is the pathological case, just start with $c_2$ and $c_3$. May 26 '18 at 12:45
{"ft_lang_label":"__label__en","ft_lang_prob":0.9452395,"math_prob":0.9998352,"size":1026,"snap":"2021-43-2021-49","text_gpt3_token_len":348,"char_repetition_ratio":0.1409002,"word_repetition_ratio":0.14903846,"special_character_ratio":0.35380116,"punctuation_ratio":0.12658228,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999304,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-21T12:10:54Z\",\"WARC-Record-ID\":\"<urn:uuid:51bc8858-b6d6-44cc-8e08-ca799b59b155>\",\"Content-Length\":\"170070\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:530f9d13-a54c-45ed-a1ee-cfd47732804d>\",\"WARC-Concurrent-To\":\"<urn:uuid:8f509893-3e1e-495c-86f3-54fcad2d4bd0>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/2796614/how-many-ways-are-there-to-paint-the-seats\",\"WARC-Payload-Digest\":\"sha1:FGVKIISZVKNPJXVQKOMVF6D5G6DEZCQC\",\"WARC-Block-Digest\":\"sha1:H2MMAMDUMBTH57YNXWTY42YSJI3TKUA3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585405.74_warc_CC-MAIN-20211021102435-20211021132435-00716.warc.gz\"}"}