This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A377881 #23 Mar 31 2025 01:46:02 %S A377881 1,1,2,72,3760,210042 %N A377881 Number of ordered pairs of real n X n (0,1)-matrices that satisfy the equation A + B = A * B. %C A377881 Matrix multiplication of A and B is commutative here. %C A377881 If A + B = A * B then (A - I)*(B - I) = I, where I is the identity matrix. For integer matrices, the determinant of (A-I) must be +-1 and its inverse gives B-I. - _Andrew Howroyd_, Nov 12 2024 %H A377881 Stuart E Anderson, <a href="/A377881/a377881_2.cpp.txt">C++ program for NxN solutions</a> %H A377881 Math Stackexchange, <a href="https://math.stackexchange.com/questions/4905498/if-ab-ab-does-it-imply-a-b-commute">If A+B=AB, A,B commute</a> %e A377881 One of the 72 solutions in 3x3 (1,0) matrices: %e A377881 A = {{0,0,0},{0,1,1},{1,1,1}}, %e A377881 B = {{0,0,0},{1,1,1},{0,1,1}} %e A377881 A + B = {{0,0,0},{1,2,2},{1,2,2}} %e A377881 A * B = {{0,0,0},{1,2,2},{1,2,2}} %o A377881 (PARI) \\ See comments. Uses Gray code to generate A-I (called A here). %o A377881 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 %Y A377881 Cf. A060757. %K A377881 nonn,more %O A377881 0,3 %A A377881 _Stuart E Anderson_, Nov 10 2024 %E A377881 a(4) corrected and a(5) from _Andrew Howroyd_, Nov 12 2024