How to solve the following two system of matrix equations:
A2B+ABA+BA2=0 and B2A+BAB+AB2=0 simultaneously for non-singular matrix A∈Mn(Z) and for some nilpotent matrix B∈Mn(Z).
I am trying to find some examples for some n=2,3,4,…, but could not write a sage code for this that gives an example.