Possibilities Hexagon Coloring we colored vertices of a hexagon convex  by three different colors ; such that every color appears exactly only two times in the vertices .
Find the number of possibilities in order to get every vertice of this hexagon colored such that any two neighboring points have distinct colors.
The answer must be either 4 or 5.
Can we generalize the solution to a problem like this?
we colored vertices of a 2n-gon convex  by n different colors ; such that every color appears exactly only two times in the vertices .
Find the number of possibilities in order to get every vertice of this convex colored such that any two neighboring points have distinct colors.
please post some hints. I don't want actually a full solution.
 A: We present  the five  non-isomorphic proper  colorings of  the hexagon
with  two  instances  of   three  different  colors  under  rotational
symmetry for the reader to peruse in retracing the symmetries.

The Maple code for this was as follows.

with(combinat);

PLOTCIRCNOADJ3 :=
proc()
local n, src, neckl, pos, perm, orbits, orbit, uniqorbs,
    nxt, loc, fd, current, vert1, vert2,
    line, prolog, rot, colors, bbox;

    orbits := table();

    n := 3;
    src := [seq(q, q=1..n), seq(q, q=1..n)];

    for perm in permute(src) do
        neckl := [op(perm), perm[1]];

        for pos to 2*n do
            if neckl[pos] = neckl[pos+1] then
                break;
            fi;
        od;

        if pos = 2*n+1 then
            orbit := [];

            for rot to 2*n do
                nxt :=
                [seq(perm[q], q=rot..2*n),
                 seq(perm[q], q=1..rot-1)];
                orbit := [op(orbit), nxt];
            od;

            orbits[sort(orbit)[1]] := 1;
        fi;

    od;

    uniqorbs := [indices(orbits, 'nolist')];

    fd := fopen(`noniso-circnoadj3.ps`, WRITE);

    bbox := [120, 600];

    prolog :=
    ["%!PS-Adobe-1.0",
     "%%Creator: Marko Riedel",
     "%%Title: graph orbits",
     sprintf("%%%%BoundingBox: 0 0 %d %d", bbox[1], bbox[2]),
     "%%Pages: 1",
     "%%EndComments"];

    for line in prolog do
        fprintf(fd, "%s\n", line);
    od;

    fprintf(fd, "%%Page 1 1\n\n");

    colors :=
    [[1,0,0], [0,0,1], [1,1,0]];

    fprintf(fd, "8 setlinewidth 0 0.72 0 setrgbcolor\n");
    fprintf(fd, "0 0 moveto %d 0 lineto %d %d lineto\n",
            bbox[1], bbox[1], bbox[2]);
    fprintf(fd, "0 %d lineto closepath stroke\n",
           bbox[2]);

    fprintf(fd, "0.05 setlinewidth 0 setgray\n");

    fprintf(fd, "30 30 scale\n");

    for current to nops(uniqorbs) do
        fprintf(fd, "gsave\n");
        fprintf(fd, "%f %f translate\n",
                2, 2+4*(current-1));

        for pos from 0 to 5 do
            loc := exp(2*Pi*I*pos/6);
            vert1 := [Re(loc), Im(loc)];

            loc := exp(2*Pi*I*(pos+1)/6);
            vert2 := [Re(loc), Im(loc)];

            fprintf(fd, "%f %f moveto\n",
                   vert1[1], vert1[2]);
            fprintf(fd, "%f %f lineto\n",
                   vert2[1], vert2[2]);

            fprintf(fd, "closepath stroke\n");

            fprintf(fd, "gsave\n");

            fprintf(fd, "%f %f translate\n",
                    (vert1[1]+vert2[1])/2,
                    (vert1[2]+vert2[2])/2);

            fprintf(fd, "0.2 0.2 scale\n");

            fprintf(fd, "%f rotate\n",
                    90 + (pos-1)*60);

            fprintf(fd, "-0.5 0 moveto\n");
            fprintf(fd, "0.5 0 lineto\n");
            fprintf(fd, "0 2 lineto\n");

            fprintf(fd, "closepath fill\n");

            fprintf(fd, "grestore\n");
        od;

        for pos to 6 do
            loc := exp(2*Pi*I*(pos-1)/6);
            vert1 := [Re(loc), Im(loc)];

            fprintf(fd, "%f %f %f setrgbcolor\n",
                   colors[uniqorbs[current][pos]][1],
                   colors[uniqorbs[current][pos]][2],
                   colors[uniqorbs[current][pos]][3]);
            fprintf(fd, "%f %f 0.24 0 360 arc\n",
                    vert1[1], vert1[2]);
            fprintf(fd, "fill\n");


            fprintf(fd, "0 0 0 setrgbcolor\n");
            fprintf(fd, "%f %f 0.24 0 360 arc\n",
                    vert1[1], vert1[2]);
            fprintf(fd, "stroke\n");
        od;

        fprintf(fd, "grestore\n");
    od;


    fprintf(fd, "showpage\n");
    fclose(fd);

    true;
end;

A: For a hexagon, careful counting will get you there.  The first color can either have its two vertices opposite or next but one to each other.  If they are opposite, the next color can either be opposite or both next to the same one of the first, two choices.  If the first color is next but one, placing a color in the space between them forces everything, so two more for a total of four.  If you count by hand the first few you can look in OEIS to see if you can find the sequence.  That often finds references.
