Problem

Source: 2021 IGMO Christmas Edition R2 #2 https://artofproblemsolving.com/community/c3685419_igmo

Tags: combinatorics



Santa has almost finished decorating his giant gingerbread house for Christmas. The only thing left to do is to create a circular fence around it. For this purpose Santa wants to use $n \ge 2$ candy canes in $3$ colors: Green, Red and White, but he doesn't want any two adjacent candy canes to have the same color. Find the number of possible arrangements of this fence in terms of $n$. Note : Single candy canes are distinguishable.