TAOCP 2.2.6 Exercise 3
If the lower triangular matrix is indexed by $1 \le k \le j \le n$, the lexicographic order becomes A[1,1],\; A[2,1],A[2,2],\; \ldots,\; A[n,1],A[n,2],\ldots,A[n,n].
Section 2.2.6: Arrays and Orthogonal Lists
Exercise 3. [**] [21] The text considers lower triangular matrices A[j,k] for $0 \le k \le j \le n$. How can the discussion of such matrices readily be modified for the case that subscripts start at 1 instead of 0, so that $1 \le k \le j \le n$?
Verified: no
Solve time: 29s
If the lower triangular matrix is indexed by $1 \le k \le j \le n$, the lexicographic order becomes
$$ A[1,1],; A[2,1],A[2,2],; \ldots,; A[n,1],A[n,2],\ldots,A[n,n]. $$
The number of entries preceding row $J$ is
$$ 1+2+\cdots+(J-1)=\frac{(J-1)J}{2}, $$
and within row $J$, the element $A[J,K]$ is displaced by $K-1$ positions. Hence, with one-word entries,
$$ \operatorname{LOC}(A[J,K]) = \operatorname{LOC}(A[1,1]) + \frac{(J-1)J}{2} + (K-1). $$
Equivalently,
$$ \operatorname{LOC}(A[J,K]) = \operatorname{LOC}(A[1,1]) -1 + \frac{J(J-1)}{2} + K. $$
Thus the discussion is modified merely by shifting the indexing from $0$ to $1$; formula (9) becomes the corresponding formula for the new lower bounds. $\boxed{\operatorname{LOC}(A[J,K])=\operatorname{LOC}(A[1,1])+\frac{(J-1)J}{2}+(K-1)}$