- 832

- 30

The thing is that, lets say, for the first row, I have indexes that are non zero for all elements ##a_{1,j}## such that ##j \leq C##, with C an integer.

For the second row, the first index which is not zero is ##a_{2,C+1}## and the last non zero entry is ##a_{2,2C-1}##

For the third row, the first non zero element is ##a_{3,2C}##, and the last non zero entry is ##a_{3,3C-3}##

For the fourth row the first non zero entry is ##a_{4,3C-2}##, and the last non zero entry reads: ##a_{4,4C-5}##.

For the fifth element it is ##a_{5,4C-4}## and the last ##a_{5,5C-10}##

For the sixth: ##a_{6,5C-9}## and the last is: ##a_{6,6C-15}##;

For the seventh, first: ##a_{7,6C-14}##, last ##a_{7,7C-21}##

Eighth, first: ##a_{8,7C-20}##, last: ##a_{8,8C-28}##

I think that if I figure out a general formula for the sequence I've posted at the beginning, then I could generate the indexes for any arbitrary matrix element which is non zero, and for any matrix size.

Thanks in advance.