login
A341585
Number of main classes of cyclic diagonal Latin squares of order 2n+1.
6
1, 0, 1, 1, 0, 2, 3, 0, 4, 4, 0, 5, 1, 0, 7, 7, 0, 1, 9, 0, 10, 10, 0, 11, 1, 0, 13, 2, 0, 14, 15, 0, 3, 16, 0, 17, 18, 0, 4, 19, 0, 20, 4, 0, 22, 5, 0, 4, 24, 0, 25, 25, 0, 26, 27, 0, 28, 5, 0, 7, 2, 0, 1, 31, 0, 32, 8, 0, 34, 34, 0, 10, 7, 0, 37, 37, 0, 7, 39, 0, 10
OFFSET
0,6
COMMENTS
There are no cyclic diagonal Latin squares of even order.
All cyclic diagonal Latin squares are pandiagonal. Conversely, all pandiagonal Latin squares are cyclic for orders 5, 7 and 11.
From Andrew Howroyd, May 01 2021: (Start)
Depending on exactly which Latin squares constitute a main class, slightly different sequences are possible. Another variation is given in A343866.
In this sequence equivalence allows for the permutation of symbols, the transpose of rows with columns, and any permutation of rows and columns that preserves the cyclic and diagonal properties. This permutation must transform every cyclic diagonal Latin square into another, but does not necessarily transform an arbitrary diagonal Latin square that is not cyclic into another diagonal Latin square.
The row (or column) permutations that satisfy this requirement form a group and are those where every k-th row (or column) is taken cyclically where k is any number that is congruent to 1 or -1 modulo every prime divisor of the order of the Latin square. (End)
FORMULA
a((p-1)/2) = A343866((p-1)/2) for odd prime p. - Andrew Howroyd, May 02 2021
EXAMPLE
For n=0 there is only 1 Latin square of order 1, so a(0)=1.
For n=2 there is one main class with canonical form (CF) of cyclic diagonal Latin squares of order 2n+1=5:
0 1 2 3 4
2 3 4 0 1
4 0 1 2 3
1 2 3 4 0
3 4 0 1 2
so a(2)=1.
For n=3 there is one main class of order 7 with CF:
0 1 2 3 4 5 6
2 3 4 5 6 0 1
4 5 6 0 1 2 3
6 0 1 2 3 4 5
1 2 3 4 5 6 0
3 4 5 6 0 1 2
5 6 0 1 2 3 4
so a(3)=1.
a(12) = 1. There are A123565(25) = 10 cyclic diagonal Latin squares whose first row is in ascending order. The 10 row permutations constructed by selecting every k-th row cyclically where k is one of 1, 4, 6, 9, 11, 14, 16, 19, 21, 24 (numbers congruent to 1 or -1 modulo 5) transforms each of these between each other so there is only a single class. - Andrew Howroyd, May 02 2021
PROG
(PARI)
G(n)={my(f=factor(n)[, 1]); select((d->for(i=1, #f, if((d-1)%f[i]&&(d+1)%f[i], return(0))); 1), [1..n])}
iscanon(n, k, g) = k <= vecmin(g*k%n) && k <= vecmin(g*lift(1/Mod(k, n))%n)
a(n)={if(n==0, 1, my(m=2*n+1, g=G(m)); sum(k=1, m-1, gcd(m, k)==1 && gcd(m, k-1)==1 && gcd(m, k+1)==1 && iscanon(m, k, g)))} \\ Andrew Howroyd, Apr 30 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Eduard I. Vatutin, Feb 15 2021
EXTENSIONS
Offset corrected and terms a(12) and beyond from Andrew Howroyd, Apr 30 2021
STATUS
approved