I have no background in math. I am a writer and have developed a storytelling technique I'm starting to find out may have strong roots in math. What is the pattern 1,2,3,4,5,6..2,1,4,3,6,5..3,4,5,6,1,2..4,3,6,5,2,1..5,6,1,2,3,4..6,5,2,1,4,3






And it if reverse the orders and operations:







I figured if I came up with an RGB color scheme with numbers, I was following the same pattern.

Can anyone tell me exactly what this is, or help me at least look in the right direction. The only thing I can find online is something called a dihedral group of order 6.

EDIT: Again, I have no math back ground. About a year ago, I wrote down the number 1,2,3,4,5,6 and tried to figure out a "perfect" way to organize them. In my case, how to organize 6 elements in a story on a function of (time.).... this is what I came up with..

*** the only other correlation I can find is Hex Color Code (when I type the numbers in Google.. 1,2,3,4,5,6 is blue and 2,1,4,3,6,5 is deep blue.. 3,4,5,6,1,2 is green and 4,3,6,5,2,1 is deep green.. 5,6,1,2,3,4 is red and 6,5,2,1,4,3 is deep rose..

********* Thanks Danu for an answer

  • 5
    $\begingroup$ oeis.org $\endgroup$ Jul 24, 2016 at 20:38
  • 1
    $\begingroup$ It's not HTML colors, it's hexadecimal basis. It can encrypt any type of information you want. $\endgroup$
    – Matt
    Jul 24, 2016 at 20:49
  • $\begingroup$ You might want to talk about either how you came up with this or where you saw it. $\endgroup$ Jul 25, 2016 at 2:10
  • $\begingroup$ @matt: I can't see how you affirm that. Digits 1 to 6 could as well correspond to octal of decimal numbers. On another side, HexColor Codes indeed represent colors and not "any type of information you want". $\endgroup$
    – user65203
    Jul 25, 2016 at 7:12

2 Answers 2


My guess as to what you are really doing:

First row: You start with $\{1,2,3,4,5,6\}$, then perform a pairwise switch:

$$\{2k-1,2k\}\mapsto \{2k,2k-1\} \qquad k\in\{1,2,3\}$$

Then, you perform a cyclic permutation by two entries on the thing you first started with:

$$\{1,2,3,4,5,6\} \mapsto \{3,4,5,6,1,2\}$$

and switch around pairs again. Performing the cyclic permutation once more and then doing the pairwise switch you get your first full row.

In fact, this is also how you generate your first column.

Then, you do the same thing you did for the first row with whatever sequence you got in the first position of the row, to generate the corresponding row. You've got six permutations that you've listed six times, each in different order.

Your big table simplifies drastically when you just assign a single character to each permutation. I will label each permutation by the letter corresponding to its position in the first row, e.g. $5,6,1,2,3,4\mapsto e$. Your table then looks like this: $$ \begin{matrix} a & b & c & d & e & f \\ b & a & d & c & f & e \\ c & d & e & f & a & b \\ d & c & f & e & b & a \\ e & f & a & b & c & d \\ f & e & b & a & d & c \end{matrix}$$

That's already a lot clearer, isn't it? It is obvious that the pairs $\{a,b\}$, $\{c,d\}$, $\{e,f\}$ "stick together" in the rows, so we can make a different relabeling which will give a $6\times 3$ array:

$$ a,b=a_1; \ b,a=a_2;\ c,d=b_1 \qquad \text{etc.}$$

$$ \begin{matrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ b_1 & c_1 & a_1 \\ b_2 & c_2 & a_2 \\ c_1 & a_1 & b_1 \\ c_2 & a_2 & b_2 \end{matrix} $$

We can apply this process once more to the "vertical pairs" $a_1,a_2$ by the obvious labeling $x_ix_j=x_{ij}$ where $x \in\{a,b,c\}$ and $i,j\in\{1,2\}$. We then have:

$$ \begin{matrix} a_{12} & b_{12} & c_{12} \\ b_{12} & c_{12} & a_{12} \\ c_{12} & a_{12} & b_{12} \\ \end{matrix} $$ This is a much more compact representation of what you're doing. Note that it nevertheless contains the full information, since we can decode it with ease, for example:

$$ c_{12}=\begin{matrix} c_1 \\ c_2 \end{matrix} = \begin{matrix} e & f \\ f & e \end{matrix}$$

In fact, we're not even done simplifying. In our current table, every entry carries the label $12$, so the label actually doesn't convey any new information at all. We can just remove it, and renaming $x_{12}=X$ we find

$$ \begin{matrix} A & B & C \\ B & C & A \\ C & A & B \\ \end{matrix} $$

This representation makes most of the observations you list rather clear: For instance, it is pretty obvious form the structure of the $2\times 2$ arrays $X$ and the total $3\times 3$ array that each row and column in the $3\times 3$ table results in rows and columns in the original $6\times 6$ table where each digit takes on each position exactly once, so summing up digits in identical positions always yields $\sum_{k=1}^6 k=21$.

Note that each row and column is a cyclic permutation of the others (as could have already been seen directly from your original table), so the object is quite nice and symmetric. There is a symmetry along the top-left to bottom-right diagonal, and mirroring along the top-right to bottom-left diagonal only interchanges $A$ and $B$.

This is what is known as a circulant matrix, which is determined completely by a single row or column. Do note, however, that your matrix has the cyclic permutations going the other way as the definition on Wikipedia of a circulant matrix. But this is really not an essential point, rather just a convention.

Circulant matrices are well-studied and have a lot of interesting properties, as you can see from the link, or from e.g. this book, which apparently (cf. this review) discusses a connection to magic squares, which I suspect could be very cool and interesting. A freely available book (which does not discuss magic squares, sadly) can be found here. The site circulants.org also has other interesting resources.


I can describe the pattern as follows:

  • write the integers from one to six;
  • swap in pairs;
  • unswap and rotate by two positions to the left;
  • swap in pairs;
  • unswap and rotate by two positions to the left;
  • swap in pairs.

This yields six sequences of digits, forming a row. You apply the same pattern to the sequences vertically to get six rows, i.e. thirty six sequences arranged in an array as it looks rather anecdotic.

I really doubt that this has a name.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .