Generating all the increasing subsequences
Here is an algorithm to generate all increasing sequences of length $4$ of the numbers $1,\ldots,n$:
for d in {4,...,n}:
  for c in {3,...,d-1}:
    for b in {2,...,c-1}:
      for a in {1,...,b-1}:
        output a,b,c,d