OFFSET
1,2
COMMENTS
When organized as a triangular table
1;
2, 3;
4, 6, 8;
10, 16, 22, 28;
34, 58, 82, 106, 130;
...
the k-th term of row n gives the position of the first n-letter permutation beginning with number k among all the lexicographically ordered permutations A030299. Thus the terms give the positions of rows of irregular table A237265 among the rows of A030298.
Note: the notation !n stands for the left factorial, A003422(n).
LINKS
Antti Karttunen, Rows 1..45 of the triangular table, flattened
MATHEMATICA
lf[n_] := lf[n] = (-1)^n n! Subfactorial[-n - 1] - Subfactorial[-1] // FullSimplify;
T[n_, k_] := lf[n] + (k - 1)(n - 1)!;
Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten
PROG
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Feb 08 2014
STATUS
approved