Let $A$ and $B$ be two $4$ by $4$ matrices. Using Newton's identites, one can prove that if $$det(A) = det(B)$$ and $$tr(A^i) = tr(B^i)$$ for $i=1,2,3$, then $A$ and $B$ have the same characteristic polynomial, thus the same eigenvalues.

I'm interested in pairs of matrices $A$ and $B$ that satisfy all those equations except the last one, i.e. $$det(A)=det(B)$$ $$tr(A)=tr(B)$$ $$tr(A^2)=tr(B^2)$$ but $tr(A^3) \neq tr(B^3)$.

Does anyone know how to generate such matrices? Have they ever been studied? A reference would be nice.

Thank you, Malik