I am trying to write a sum of the form $$\sum_{i<j}f_{ij}$$ where $i,j\in \{1,2,3,4\}.$
I want to write something like Sum[f[[i,j]], {j,1,4},{i,1,j}]
but then this is equal to the following sum
$$\sum_{i\leq j}f_{ij}.$$
I know that I can subtract the $f_{ii}$ from this and recover the answer, but the quantities that I am summing over involve several metrics and tensors so I was wondering if there is a clean way to write sums like I mentioned earlier?
Sum[f[[i,j]], {j,1,4},{i,1,j-1}]
? $\endgroup$Sum[f[[i,j]], {j,2,4},{i,1,j-1}]
instead. $\endgroup$Sum
returns0
.Table
andProduct
behave similarly, returning{}
and1
respectively. $\endgroup$