By the Kronecker product I mean the ordinary tensor product of matrices. In my case I am only interested in square matrices, in fact I want to compute the nonzero elements of products like XXZZXXZZ where X and Z are 2x2 matrices (in fact they are the pauli matrices e.g. the standard representation of the SU(2) algebra). If I naively compute a tensor product of ~30 pauli matrices, I excede all the computer memory that is availible to a researcher like me. The product itself is quite sparse, and if I only had to store the non-zero elements into memory then I could work with much larger cases of interest. The solution is a formula that computes the i,j component of the tensor product, it seems so straightforward I could do it myself but I presume it has already been done.