Indices of the lower triangle of a stacked/vectorized/unrolled matrix Consider a $K \times K$ matrix $M$ with its elements labeled sequentially:
$$
\left[\matrix{
1 & K + 1 && (K - 1) K + 1 \\
2 & K + 2 && (K - 1) K + 2\\
3 & K + 3 &\dots& (K - 1) K + 3\\
&\vdots\\
K & K + K && (K - 1) K + K
}\right]
$$
One can obtain the labels of elements on the diagonal with the sequence
$$
D(K) = \{d_k\}_{k=0}^{K - 1},\quad d_k = k (K + 1) + 1
$$
Is there a similar sequence, say $L(K)$, that can be used to obtain elements in the (strict) lower triangle of $M$? I'm specifically looking for a one-to-one mapping between $\{k_1,\dots ,k_2\}$ and $\{1,\dots , K^2\}$, where $k_1 < k_2$.
By way of example, let $K = 4$. Then M has the labels
$$
\left[\matrix{
1 & 5 & 9 & 13\\
2 & 6 & 10 & 14\\
3 & 7 & 11 & 15\\
4 & 8 & 12 & 16\\
}\right]
$$
The elements on the diagonal are $\{1, 6, 11, 16\} = D(4)$. That is, $D(4)$ maps $\{0,1,2,3\}$ to $\{1,6,11,16\}$. I'm looking for an $L(4)$ that will map some contiguous sequence of integers to $\{2, 3, 4, 7, 8, 12\}$.
I came up with a kind of informal algorithm that involves "skipping" a growing number of elements and "including" a decreasing number of elements, but I haven't figured out how to wrap it up in a simple mathematical expression.
This question is related to Accessing elements of packed symmetric distance matrix, How to find a function mapping matrix indices?, and Matrix location by indices?. But I can't figure out how to apply those answers to my case. My goal here is to avoid double indexing.
 A: Here's a possible way to get explicitly each number in $L(K)$. The key idea is to notice that if we follow the colored diagonals:
$$\left[\matrix{
1 & 5 & 9 & 13\\
\color{red} 2 & 6 & 10 & 14\\
\color{blue}3 & \color{red}7 & 11 & 15\\
\color{green} 4 & \color{blue} 8 & \color{red}{12} & 16\\
}\right]$$
then the jump is always of $K+1$ ($=5$ in the example above), i.e. $\color{red}7=\color{red}2+5, \color{red}{12} = \color{red}7+5$ and $\color{blue}8=\color{blue}3+5$. Thus we get
$$L(K)=\bigcup_{i=2}^K\bigcup_{j=0}^{K-i} \big\{i+j(K+1)\big\}$$
Note that elements of this set can be easily generated using the following pseudo-code:

$l=1$
  for $i = 1,\ldots,K$
  $\qquad$ for $j = 0,\ldots,K-i$
  $\qquad$ $\qquad$ $d_l = i+j(K+1)$
  $\qquad$ $\qquad$ $l=l+1$
  $\qquad$ end for
  end for

With output $L(K)=\{d_1,\ldots,d_{K(K-1)/2}\}.$ If you want to generate them directly in the good order, you may rewrite $L(K)$ as follow
$$L(K)=\bigcup_{j=0}^{K-2}\bigcup_{i=2}^{K-j} \big\{i+j(K+1)\big\}.$$
In your example, this basically goes along the red, blue and green columns respectively:
$$\left[\matrix{
1 & 5 & 9 & 13\\
\color{red} 2 & 6 & 10 & 14\\
\color{red}3 & \color{blue}7 & 11 & 15\\
\color{red} 4 & \color{blue} 8 & \color{green}{12} & 16\\
}\right]$$
It can be implemented as follow:

$l=1$
  for $j = 0,\ldots,K-2$
  $\qquad$ for $i = 2,\ldots,K-j$
  $\qquad$ $\qquad$ $d_l = i+j(K+1)$
  $\qquad$ $\qquad$ $l=l+1$
  $\qquad$ end for
  end for

With output $L(K)=\{d_1,\ldots,d_{K(K-1)/2}\}$ such that $d_1<d_2<\ldots<d_{K(K-1)/2}$.
