OFFSET
0,4
COMMENTS
Also the number of permutations of [n] for which the sum of the positions of the left-to-right maxima is n: a(4) = 3: 2143, 3142, 3241; a(5) = 8: 31254, 32154, 41253, 41352, 42153, 42351, 43152, 43251.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..451
Wikipedia, Permutation
FORMULA
a(n) = A143946(n,n).
a(n) ~ c * (n-1)!, where c = 0.561459..., conjecture: c = exp(-gamma) = A080130, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Dec 29 2023
EXAMPLE
a(0) = 1: the empty permutation.
a(1) = 1: (1).
a(2) = 0.
a(3) = 2: (13)(2), (1)(23).
a(4) = 3: (124)(3), (142)(3), (12)(34).
a(5) = 8: (1235)(4), (1253)(4), (1325)(4), (1352)(4), (1523)(4), (1532)(4), (123)(45), (132)(45).
MAPLE
b:= proc(n) option remember; `if`(n=0, 1,
expand(b(n-1)*(x^n+n-1)))
end:
a:= n-> coeff(b(n), x, n):
seq(a(n), n=0..23);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 18 2023
STATUS
approved