%I #5 May 02 2021 20:18:31
%S 1,0,1,1,0,2,3,0,4,4,0,5,3,0,7,7,0,2,9,0,10,10,0,11,7,0,13,4,0,14,15,
%T 0,6,16,0,17,18,0,8,19,0,20,8,0,22,10,0,8,24,0,25,25,0,26,27,0,28,10,
%U 0,14,22,0,13,31,0,32,16,0,34,34,0,20,14,0,37,37,0,14,39,0,20
%N Number of inequivalent cyclic diagonal Latin squares of order 2n+1 up to rotations, reflections and permutation of symbols.
%C Also the number of main classes of diagonal Latin squares of order 2n+1 that contain a cyclic Latin square. Compare A341585.
%F a((p-1)/2) = A341585((p-1)/2) for odd prime p.
%e a(12) = 3 since there are A123565(25) = 10 cyclic diagonal Latin squares whose first row is in ascending order. Each of these is uniquely defined by the step between rows and form 5 pairs by horizontal or vertical reflection (negating the step between rows). Up to exchanging rows with columns there are 3 distinct classes, so a(12) = 3.
%o (PARI)
%o iscanon(n,k,g) = k <= vecmin(g*k%n) && k <= vecmin(g*lift(1/Mod(k,n))%n)
%o a(n)={if(n==0, 1, my(m=2*n+1); sum(k=1, m-1, gcd(m,k)==1 && gcd(m,k-1)==1 && gcd(m,k+1)==1 && iscanon(m, k, [1,-1])))}
%Y Cf. A123565, A287764, A338562, A341585.
%K nonn
%O 0,6
%A _Andrew Howroyd_, May 02 2021