TITLE: Coloring a triangular bipyramid
QUESTION [2 upvotes]: A triangular bipyramid looks like this: http://mathworld.wolfram.com/TriangularDipyramid.html
I have to find the ways to color it using n colors allowing rotations and reflections. I do not understand where to start with this. Manual counting even for small cases look difficult. There is nothing on OEIS too and a google search doesn't return anything so I am stumped and looking for some ways to tackle this problem.
Thanks!
EDIT: I wrote a C++ program to find the answer for small cases and feeding those values to OEIS leads me to the following sequence: http://oeis.org/A027670 Can someone please confirm whether this is correct or not?

REPLY [2 votes]: Fortunately a triangular dipyramid is  simple enough for us to be able
manually to compute  the cycle index of the  actions of all symmetries
on vertices  and faces. We will  then verify these  in software. There
are  three types of  symmetries that  act here:  exchanges of  the two
vertices of degree  three, call them $A$ and  $B$, rotations about the
axis passing through $A$ and $B$ and reflections about a plane passing
through $A$  and $B$ and  one of the  three vertices $U,V$ and  $W$ of
degree four. In this problem it is sufficient to apply Burnside to the
cycle indices as Polya would produce more information than we need.
Now the key observation here is that these symmetries can establish
any permutation  of the $A$ and  $B$ combined with  any permutation of
$U, V$  and $W$. Therefore we get  for the action on  the vertices the
instant cycle index
$$Z(G_1) = \frac{1}{12}(a_1^2+a_2)(a_1^3 + 2a_3 + 3a_1 a_2)
\\ = \frac{1}{12} (a_1^5 + 2a_1^2a_3 + 3a_1^3a_2
+ a_2a_1^3 + 2a_2a_3 + 3a_1a_2^2)
\\ = \frac{1}{12} (a_1^5 + 2a_1^2a_3 + 4a_1^3a_2
+ 2a_2a_3 + 3a_1a_2^2).$$
This yields for colorings with at most $n$ colors of the vertices
$$\frac{1}{12} (n^5 + 5n^3 + 4n^4 + 2n^2).$$
This yields the sequence
$$1, 12, 60, 200, 525, 1176, 2352, 4320, 7425, 12100,\ldots$$
which points us to OEIS A004302.
Now  for  the  six  faces  it is  slightly  different,  start  with
automorphisms that  fix $A$ and $B$.  These permute the  upper and the
lower faces separately. We get
$$a_1^6 + 2a_3^2 + 3a_1^2 a_2^2.$$
For an automorphism that exchanges  $A$ and $B$ followed by a rotation
we get
$$a_2^3 + 2 a_6$$
and followed by a reflection
$$3 a_2^3.$$
The cycle index for the faces is
$$Z(G_2) =
\frac{1}{12} (a_1^6 + 2a_3^2 + 3a_1^2 a_2^2 + 4 a_2^3 + 2a_6).$$
We get for colorings with at most $n$ colors of the faces
$$\frac{1}{12} (n^6 + 2n^2 + 3n^4 + 4 n^3 + 2n).$$
This yields the sequence
$$1, 13, 92, 430, 1505, 4291, 10528, 23052, 46185, 86185,\ldots$$
which  points   us  to  OEIS   A027670  as
conjectured by the OP.
 We can verify these cycle indices by computing them from the basic
property that  any permutation of $A$  and $B$ and  any permutation of
the remaining  vertices $U,V$ and $W$ contributes.  The following code
implements this.

pet_autom2cycles :=
proc(src, aut)
local numa, numsubs;
local marks, pos, cycs, cpos, clen;

    numsubs := [seq(src[k]=k, k=1..nops(src))];
    numa := subs(numsubs, aut);

    marks := Array([seq(true, pos=1..nops(aut))]);

    cycs := []; pos := 1;

    while pos <= nops(aut) do
        if marks[pos] then
            clen := 0; cpos := pos;

            while marks[cpos] do
                marks[cpos] := false;
                cpos := numa[cpos];
                clen := clen+1;
            od;

            cycs := [op(cycs), clen];
        fi;

        pos := pos+1;
    od;

    return mul(a[cycs[k]], k=1..nops(cycs));
end;

pet_cycleind_tdp_verts :=
proc()
local p1, p2, cind, AB, UVW, verts, vperm;
    cind := 0;

    AB := [[1=1, 2=2], [1=2, 2=1]];
    UVW := [[3=3, 4=4, 5=5],
            [3=3, 4=5, 5=4],
            [3=5, 4=4, 5=3],
            [3=4, 4=3, 5=5],
            [3=4, 4=5, 5=3],
            [3=5, 5=4, 4=3]];

    verts := [seq(q, q=1..5)];

    for p1 in AB do
        for p2 in UVW do
            vperm := subs(p2, subs(p1, verts));

            cind := cind +
            pet_autom2cycles(verts, vperm);
        od;
    od;

    cind/12;
end;

pet_cycleind_tdp_faces :=
proc()
local p1, p2, cind, AB, UVW, faces, fperm;
    cind := 0;

    AB := [[1=1, 2=2], [1=2, 2=1]];
    UVW := [[3=3, 4=4, 5=5],
            [3=3, 4=5, 5=4],
            [3=5, 4=4, 5=3],
            [3=4, 4=3, 5=5],
            [3=4, 4=5, 5=3],
            [3=5, 5=4, 4=3]];

    faces :=
    [{1,3,4}, {1,3,5}, {1,4,5},
     {2,3,4}, {2,3,5}, {2,4,5}];

    for p1 in AB do
        for p2 in UVW do
            fperm := subs(p2, subs(p1, faces));

            cind := cind +
            pet_autom2cycles(faces, fperm);
        od;
    od;

    cind/12;
end;

Xverts :=
subs([seq(a[q]=n, q=1..6)], pet_cycleind_tdp_verts());

Xfaces :=
subs([seq(a[q]=n, q=1..6)], pet_cycleind_tdp_faces());

The output from this is indeed

                       5        4         3        2
       Xverts := 1/12 n  + 1/3 n  + 5/12 n  + 1/6 n

                    6        4        3        2
    Xfaces := 1/12 n  + 1/4 n  + 1/3 n  + 1/6 n  + 1/6 n

> pet_cycleind_tdp_verts();
         5           3                2
1/12 a[1]  + 1/3 a[1]  a[2] + 1/6 a[1]  a[3]

               2
     + 1/4 a[2]  a[1] + 1/6 a[2] a[3]

> pet_cycleind_tdp_faces();
         6           2     2           3           2
1/12 a[1]  + 1/4 a[2]  a[1]  + 1/3 a[2]  + 1/6 a[3]

     + 1/6 a[6]
{"set_name": "stack_exchange", "score": 2, "question_id": 1852921}