# Cube Art Choices

Suppose you like geometry and you like art, so you decide to decorate a cube whose faces are divided into four congruent squares as illustrated below:

Of course, it is still white, since you have yet to decide how to color your masterpiece. You want each small square to be colored with a single color, and every small square must be colored (your final product will not have any white squares). But, you would like to consider your options. Specifically, you want to know how many different colorings are possible.

We say that two colorings $$A$$ and $$B$$ are different if $$A$$ cannot be rotated to obtain $$B$$. Coloring the entire top face blue and everything else yellow is the same as coloring the bottom face blue and everything else yellow, so these are not different colorings.

Now, suppose you have $$n$$ buckets of paint to choose from, each with a distinct (non-white) color of paint. The number of different colorings you can apply using these $$n$$ buckets can be expressed as:

$\frac{a_1}{a_2}n^{24} + \frac{a_3}{a_4}n^{12} + \frac{a_5}{a_6}n^8 + \frac{a_7}{a_8}n^6$

for positive integers $$a_1, \dots, a_8$$ where $$\text{gcd}(a_1,a_2) = \text{gcd}(a_3,a_4) = \text{gcd}(a_5,a_6) = \text{gcd}(a_7,a_8) = 1$$. What is the value of $$a_1 + a_2 + \dots + a_8$$?

×