divisibility by powers of $2$ of diagonal sums of infinite latin square

This array is formed by placing integers such that each is the smallest such that the rectangle with it and the top left hand corner as opposite corners does not contain the same integer twice in any row or column.

$\begin{array}\\ 1&2&3&4&5&6&7&8&9 \ \ ...\\ 2&1&4&3&6&5&8&7&10\\ 3&4&1&2&7&8&5&6&11\\ 4&3&2&1&8&7&6&5&12\\ 5&6&7&8&1&2&3&4&13\\ \vdots \end{array}$

The diagonal sums form the sequence $p_1(n)=1,4,7,16,17,28,39,64,57,68,79,112,121,156,191,256,225,228,231...$

Since the array is symmetric and each $2^n$ by $2^n$ submatrix and every $2^{nd}$ row is made by swapping pairs in the row above and every $4^{th}$ row is made by swapping pairs of pairs in the row $2$ above etc. $2^{k}|p_1(n) \ \text{iff} \ 2^{\lceil\frac{k}2\rceil}|n$.

This array is the $1^{st}$ plane of a latin cube where the $2^{nd}$ plane would be

$\begin{array}\\ 2&1&4&3&6&5&8&7&10 \ \dots\\ 1&2&3&4&5&6&7&8&9\\ 4&3&2&1&8&7&6&5&16\\ 3&4&1&2&7&8&5&6&11\\ \vdots \end{array}$

With diagonal sums $p_2(n)=2,2,10,12,22,22,46,56,66,58,98,108...$

$2|p_2(n) \forall n \\ 4|p_2(n) \text{ iff } 4|n \\ 8|p_2(n) \text{ iff } 8|n$

Plane $3$:

$\begin{array}\\ 3&4&1&2&7 \ \dots\\ 4&3&2&1&8\\ \vdots \end{array}$

$p_3(n)=3,8,5,8,19,40,37,48,59,88,77,88...\\ p_4(n)=4,6,8,4,24,34,44,40,68...\\ p_5(n)=5,12,19,32,21,20,19,32,45...$

When does $2^k|p_i(n)$ in general?

The sums of the elements on diagonal planes make the sequence $s(n)=1,6,12,38,45,72... \text{ where } s(n)=\sum_{i=1}^n p_i(n-i+1)$. Is every third number in this sequence a multiple of $4$?

What happens if this is the $1^{st}$ cube in an infinite latin tessarect?

-
why is there a $1$ on the 2nd plane, 2nd row, 2nd column ? – mercio Nov 9 '12 at 21:55
There are no other $1$s above or in the same row and column as it. P.S. just noticed that the $n^{th}$ plane is a Cayley table for a group where $n$ is the identity and every element has order $2$, and the whole cube could represent something like a group but with a trinary operation. Also, all of the planes are just row permutations of the first one. – Angela Richardson Nov 10 '12 at 14:00
Ok I see. The numbers in the cube should look a lot like grundy numbers for the nim game with 3 stacks (or Nimbers), since their construction are relatively similar. And the hidden law group involved should be binary XOR – mercio Nov 10 '12 at 19:41
I’m not sure I understand what you mean by “diagonal sums”. On the first array, for example, I see only ones on the diagonal, so I would have thought that $p_1(n)=n$. – Ewan Delanoy Nov 22 '12 at 12:16