A377881 Number of ordered pairs of real n X n (0,1)-matrices that satisfy the equation A + B = A * B.
1, 1, 2, 72, 3760, 210042
Offset: 0
Examples
One of the 72 solutions in 3x3 (1,0) matrices: A = {{0,0,0},{0,1,1},{1,1,1}}, B = {{0,0,0},{1,1,1},{0,1,1}} A + B = {{0,0,0},{1,2,2},{1,2,2}} A * B = {{0,0,0},{1,2,2},{1,2,2}}
Links
- Stuart E Anderson, C++ program for NxN solutions
- Math Stackexchange, If A+B=AB, A,B commute
Crossrefs
Cf. A060757.
Programs
-
PARI
\\ See comments. Uses Gray code to generate A-I (called A here). a(n)= { my(Id=matid(n), A=-Id); sum(f=0, 2^(n^2)-1, if(f, my(t=valuation(f,2), i=t\n+1, j=t%n+1); A[i,j]=if(i==j,-1,1)-A[i,j]); if(abs(matdet(A))==1, my(B=A^(-1)+Id); vecmin(B)>=0 && vecmax(B)<=1 && denominator(B)==1)) } \\ Andrew Howroyd, Nov 12 2024
Extensions
a(4) corrected and a(5) from Andrew Howroyd, Nov 12 2024
Comments