login
Number of pairs of 2 X 2 matrices (X,Y) over Z/nZ such that X*Y = 0 and Y*X <> 0.
0

%I #28 Dec 27 2020 19:40:35

%S 0,18,192,1296,2880,15186,16128,62208,88128,199890,158400,764688,

%T 366912,1063314,1551360,2506752,1410048,5742738,2462400,9461520,

%U 8089536,9973458,6412032,31593216,14040000,22817106,27713664,48947472,20462400,97370130,28569600,92012544

%N Number of pairs of 2 X 2 matrices (X,Y) over Z/nZ such that X*Y = 0 and Y*X <> 0.

%t WW = Array[W, {2, 2}];

%t Ma[n_] := Ma[n] = Mod[Flatten[Table[ WW, {W[1, 1], n}, {W[1, 2], n}, {W[2, 1], n}, {W[2, 2], n}], 3], n]

%t S[n_] := S[n] = Sum[If[Mod[Ma[n][[i]].Ma[n][[j]], n] == 0 WW && !Mod[ Ma[n][[j]].Ma[n][[i]], n] == 0 WW , 1, 0], {i, n^4}, {j, n ^4}]

%t Array[S, 9]

%o (Python)

%o from numba import jit

%o @jit(nopython=True)

%o def a(n):

%o c = 0

%o for ax in range(n):

%o for bx in range(n):

%o for cx in range(bx, n):

%o card = 1 + (cx > bx)

%o for dx in range(n):

%o for ay in range(n):

%o for by in range(n):

%o for cy in range(n):

%o if (ax*ay + bx*cy)%n == 0:

%o if (cx*ay + dx*cy)%n == 0:

%o for dy in range(n):

%o if ax==ay and bx==by and cx==cy and dx==dy: continue

%o if (ax*by + bx*dy)%n == 0:

%o if (cx*by + dx*dy)%n == 0:

%o if (ay*ax + by*cx)%n != 0: c += card; continue

%o if (ay*bx + by*dx)%n != 0: c += card; continue

%o if (cy*ax + dy*cx)%n != 0: c += card; continue

%o if (cy*bx + dy*dx)%n != 0: c += card; continue

%o return c

%o print([a(n) for n in range(1, 12)]) # _Michael S. Branicky_, Dec 27 2020

%Y Cf. A227433 (Number of pairs of 2 X 2 matrices over Z/nZ that do not commute).

%K nonn

%O 1,2

%A _José María Grau Ribas_, Oct 10 2020

%E Three terms corrected by _José María Grau Ribas_, Dec 19 2020

%E a(12)-a(32) from _Michael S. Branicky_, Dec 27 2020