From this it follows, that the permutation must p(i,j)=p(j,i).
However, itIt is more important to give a condition when a coloring can be constructed:the above condition is met.
Lemma 1: If p(x,y) =is reflexive (p(x,y)=p(y,x)) and associative (p(x,p(y,z))=p(p(x,y),z)) and p(vx,wy)=p(1,xy) for xy = vw≤ n, then a coloring can be constructed.
Lemma 2: For each n a permutation exists such that it reflexive and associative and for p(x,y) = p=p(v1,wxy) for xy = vw≤ n.
By each prime number a > n (the x values in the coloring), you can choose a color for c(a), but you have to continue with the permutation of that color for c(ma).
Lemma 1 is trivial to prove, because it followsthe associative and reflexive conditions makes that c(xy) is c(yx)reaching a number by different values of a, factoring the number and re-arranging makes that it must have the same value. For the values xy ≤ n, you can't factor anymore, and the condition must just met.
I haven't proven lemma 2 yetfully. For n is 1,2,3,4A permutation matrix with reflexive and associative conditions, there is onlycan be constructed by starting with 1 permutation matrix. For n = 5 there arethat has a fewsingle cycle. The condition p(x,y) = p(vfull matrix can be constructed by applying this permutation multiple times,w) for xy = vw becomes relative weaker for larger up to n. So It can be proven, I don't think it is a problem to createthat such permutation matrix (also givenhas the number of different Sudokus). Of course, lemma 2 needs to be proven properly.
Edit: For Lema 1reflexive and associative condition, it might bebut not necessary to add an associativitythe condition. That that p(x,p(y,z)) = p(p=p(x,y)1,zxy). With associativity, the proof is trivial. I don't know if it can be done without.
Edit 2: The associativity condition is indeed necessary. And this is also part of the solution. If you have a permutation that consists of 1 cycle, then the full permutation matrix can be created by applying the permutation multiple times. This ensures the associativity condition.
It is important that after n times applying the permutation, the colors are in original order again. This means that for n = 5, you must have 1 cycle, because one cycle of 3 plus one cycle of 2 does not come in original order after applying 5 times.xy ≤ n;
However, this does not count for n = 6. The solution of François as matrix looks like this:
abcdef
bdface
cfbead
daebfc
ecafdb
fedcba
The permutation from first row to second row is not a permutation, with a single cycle. It brings you from ato brow 1, from b to d androw 2 to row 4, back to arow 1. However, this can still be categorized as 1 cycle permutation, if you lookbecause the permutation from 1first row to third row, is a permutation with a single cycle.
Instead of looking at the permutation per color, it is better to look which colors are passed, when the permutation is applied multiple times. In above example the cycle is (first row to third row) a->c->b->f->d->e->a.
I think it is not difficult to create a coloring withIf we just make the second row a permutation of 1with one cycle, then the cycle starts with: 1->2->4->8->16->32->64 etc. You only need to ensure thatThen we can add 3 and the few multiplications that are belowother primes.
For n fit= 27 we can get:
1->2->4->8->16->3->6->12->24->x->9->18->5->10->20->27->x->15->7->14->11->22->x->21->25->13->26->1
In above sequence, and then create the permutation tomultiplications with 2, have 1 cyclestep, multiplication with 3, 5 steps, multiplications with 5 have 12 steps. I thinkThe remaining primes 17, 19, 23 can be placed on any of the x values. The short parts 11->22 and 13->26 can easily be exchanged. From this cycle, you can make a permutation and permutation matrix that has the condition that p(x,y) = p(1,xy) for largerxy ≤ n. From that permutation the coloring can be constructed.
As you can see, thereit is plenty of possibilities fornot very difficult to construct a coloring this way. But, the sequence is also rather crowded. It is not a prove yet that it is always possible.