A370576
a(n) is the difference between the number of n-dist-increasing and (n-1)-dist-increasing permutations p of [2n], where p is k-dist-increasing if k>=0 and p(i)
1, 1, 5, 70, 1960, 88200, 5821200, 529729200, 63567504000, 9725828112000, 1847907341280000, 426866595835680000, 117815180450647680000, 38289933646460496000000, 14473594918362067488000000, 6296013789487499357280000000, 3122822839585799681210880000000
Offset: 0
Examples
a(2) = 5 = 6 - 1 = |{1234, 1243, 1324, 2134, 2143, 3142}| - |{1234}|.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..238
- Wikipedia, K-sorted sequence
- Wikipedia, Permutation
Programs
-
Maple
a:= n-> ceil((7/9)*(2*n)!/2^n): seq(a(n), n=0..22); # second Maple program: a:= proc(n) a(n):= `if`(n<4, [1$2, 5, 70][n+1], (2*n-1)*n*a(n-1)) end: seq(a(n), n=0..22);