%I #29 Sep 22 2020 02:44:49
%S 2,12,80,2096,49792,3449088,357236224,84783217408
%N Number of normal n X n (-1,1)-matrices.
%C Obviously a(n) <= 2^(n^2) = A002416(n) - _R. J. Mathar_, Mar 14 2006
%D W. H. Press et al., Numerical Recipes, Cambridge, 1986; Chapter 11.
%H Georg Muntingh, <a href="/A055548/a055548.txt">Sage code for computing higher order entries</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/NormalMatrix.html">Normal matrix.</a>
%o (PARI) NormaQ(a,n) = { my(aT) ; aT=mattranspose(a) ; return( a*aT == aT*a ); }
%o combMat(no,n) = { my(a,noshif) ; a = matrix(n,n) ; noshif=no ; for(co=1,n, for(ro=1,n, if( (noshif %2)== 1,a[ro,co] = 1, a[ro,co] = -1) ; noshif = floor(noshif/2) ; ) ) ; return(a) ; }
%o { for (n = 1, 10, count = 0; a = matrix(n,n) ; for( no=0,2^(n^2)-1, a = combMat(no,n) ; count += NormaQ(a,n) ; /* if(no%1000==0,print(n," ",(no/2^(n^2)+0.)," ",count)) ; */ ) ; print(count) ; ) } \\ _R. J. Mathar_, Mar 14 2006
%Y Cf. A055547, A055549.
%K nonn,more,hard
%O 1,1
%A _Eric W. Weisstein_
%E a(5) from _R. J. Mathar_, Mar 14 2006
%E a(6)-a(7) from _Georg Muntingh_, Jan 31 2014
%E Offset corrected and a(8) from _Bert Dobbelaere_, Sep 21 2020