Give a generalized form [in the form of "n" i.e number of vertices of a polygon] of the number of combinations possible for 3 colored balls [infinite balls [it is not compulsory to use all the colors]] to be placed at vertices of a polygon with n vertices. The condition to be met is that no balls of same colored to be placed adjacent to each other. We consider two colorings the same if the can be obtained from one another by rotating or reflecting the n-gon.
Conditions:
No two same colors can be placed adjacent
We have only 3 types of balls and which can be used in any number as far as 1st condition is followed.
Rotation or reflection pf a coloring does not count as a new coloring.
Eg: Take a case of Triangle. Possible combinations of placing balls is 1 i.e. 1 ball of each color.
Square: we can take either 2 balls each of 2 different colors or 2 balls of one color, 1 ball each of other two colors. Which gave total combinations of 6.
Update: After the edit by the OP it becomes clear that the following does not answer his question. If colorings differing only by a rotation are considered equal we need the so-called Polya theory to tackle the problem.
I assume that we have $3$ colors numbered $0$, $1$, $2$ and $n$ sites numbered $0$, $1$, $\ldots$, $n-1$.
Put color $0$ on site $0$, and denote by $P(j)$ the number of ways to color the sites $0$, $\ldots$, $j$ such that site $j$ gets a color $\ne0$. Then we have $P(0)=0$ and $P(1)=2$; furthermore we have the recursion $$P(j)=2 P(j-2)+P(j-1)\qquad(j\geq2)\ .\tag{1}$$ Proof. If site $j-1$ is colored $0$ then site $j-1$ is colored $\ne0$, and we have two options for site $j$. If site $j-1$ is colored $\ne0$ then we have just one $\ne0$ option for site $j$.
The characteristic polynomial of $(1)$ is $\lambda^2-\lambda-2=0$ with the roots $2$ and $-1$. It follows that the general solution is $j\mapsto a 2^j +b(-1)^j$ with constants $a$ and $b$. The initial conditions then lead to $$P(j)={2\over3}\bigl(2^j-(-1)^j\bigr)\ .$$ Since site $0$ could have been colored with any of the three colors we finally obtain $$A(n)=3 P(n-1)=2^n+2(-1)^n\qquad(n\geq2)$$ admissible colorings.