A375300 Triangle T(n,k) read by rows that has the A001710(n)-th lexicographic permutation of [1,...,n] as row n.
1, 1, 2, 2, 1, 3, 2, 4, 3, 1, 3, 2, 5, 4, 1, 3, 6, 5, 4, 2, 1, 4, 3, 7, 6, 5, 2, 1, 4, 8, 7, 6, 5, 3, 2, 1, 5, 4, 9, 8, 7, 6, 3, 2, 1, 5, 10, 9, 8, 7, 6, 4, 3, 2, 1, 6, 5, 11, 10, 9, 8, 7, 4, 3, 2, 1, 6, 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 7, 6, 13, 12, 11, 10, 9, 8, 5, 4, 3, 2, 1
Offset: 1
Examples
The triangle begins 1, 1, 2, 2, 1, 3, 2, 4, 3, 1, 3, 2, 5, 4, 1, 3, 6, 5, 4, 2, 1, 4, 3, 7, 6, 5, 2, 1, 4, 8, 7, 6, 5, 3, 2, 1, 5, 4, 9, 8, 7, 6, 3, 2, 1, 5, 10, 9, 8, 7, 6, 4, 3, 2, 1, ...
Programs
-
PARI
a375300_row(n) = if (n<2, [1], my(m=n!\2); forperm(n, p, m--; if (m==0, return(Vec(p)))))