Ok, in general if we have F(j,k) summed over all 0<=j<k. (Here the F(j,k) is the discount factor multiplied by the probability of payment.)
Code:
+F(0,1)
+F(0,2)+F(1,2)
+F(0,3)+F(1,3)+F(2,3)
+F(0,4)+F(1,4)+F(2,4)+F(3,4)
+.....
.
.
Relating this to the summations in your picture,
the former relates to summing the terms row by row (ie adding all the k=1, then all the k=2, etc); and
the latter relates to summing the terms column by column (ie adding all the j=0 first, then all the j=1, etc)