%I #26 Nov 24 2023 07:23:59
%S 1,1,5,13,19,5,41,73,116,19,109,65,155,41,95,669,271,116,341,247,205,
%T 109,505,365,1084,155,1574,533,811,95,929,4193,545,271,779,1508,1331,
%U 341,775,1387,1639,205,1805,1417,2204,505,2161,3345,4388,1084,1355,2015,2755,1574,2071,2993,1705,811,3421,1235,3659,929,4756
%N The number of medial quasigroups of order n, up to isomorphism.
%C See the Wikipedia link for "Medial" for definitions. This article also contains the Bruck-Toyoda theorem which characterizes medial quasigroups in terms of abelian groups.
%H David Stanovsky, <a href="/A226193/b226193.txt">Table of n, a(n) for n = 1..63</a>
%H David Stanovský and Petr Vojtechovský, <a href="http://arxiv.org/abs/1511.03534">Central and medial quasigroups of small order</a>, arxiv preprint arXiv:1511.03534 [math.GR], 2015.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Medial">Medial</a>
%p a:=proc(n)
%p if n = 1 then
%p return 1;
%p else
%p return MAGMA:-Enumerate(n,'medial','quasigroup');
%p end if;
%p end proc;
%o (GAP) # gives the number of medial quasigroups over SmallGroup(n,k)
%o LoadPackage("loops");
%o MQ := function( n, k )
%o local G, ct, elms, inv, A, f_reps, count,f, Cf, O, g_reps, g, Cfg, W, unused, c, Wc;
%o G := SmallGroup( n, k );
%o G := IntoLoop( G );
%o ct := CayleyTable( G );
%o elms := Elements( G );
%o inv := List( List( [1..n], i -> elms[i]^(-1) ), x -> x![1] );
%o A := AutomorphismGroup( G );
%o f_reps := List( ConjugacyClasses( A ), Representative );
%o count := 0;
%o for f in f_reps do
%o Cf := Centralizer( A, f );
%o O := OrbitsDomain( Cf, A );
%o g_reps := List( O, x -> x[1] );
%o for g in g_reps do
%o Cfg := Intersection( Cf, Centralizer( A, g ) );
%o W := Set( [1..n], w -> ct[w][ inv[ ct[w^f][w^g] ] ] );
%o unused := [1..n];
%o while not IsEmpty( unused ) do
%o c := unused[1];
%o if f*g=g*f then count := count + 1; fi;
%o if Size(W) = Length(unused) then
%o unused := [];
%o else
%o Wc := Set( W, w -> ct[w][c] );
%o Wc := Union( Orbits( Cfg, Wc ) );
%o unused := Difference( unused, Wc );
%o fi;
%o od;
%o od;
%o od;
%o return count;
%o end;
%o # _David Stanovsky_, Nov 12 2015
%K nonn,hard,mult
%O 1,3
%A _W. Edwin Clark_, May 30 2013
%E a(9)-a(63) from _David Stanovsky_, Nov 12 2015