login
Number of permutations of [n] that contain at least two fixed points in a succession.
1

%I #32 Mar 15 2021 08:33:06

%S 0,0,1,1,4,18,93,579,4165,34031,311528,3158978,35154907,426029455,

%T 5585287179,78767551059,1189090451364,19133023344034,326894939779865,

%U 5910529926220115,112753567098061553,2263304875358959543,47687055915645538384,1052290471481700378570

%N Number of permutations of [n] that contain at least two fixed points in a succession.

%C A succession of a permutation p is the appearance of [k,k+1], e.g. in 23541, 23 is a succession.

%H Alois P. Heinz, <a href="/A209256/b209256.txt">Table of n, a(n) for n = 0..200</a>

%F a(n) ~ (n-1)! * (1 - 3/(2*n) + 2/(3*n^2) + 47/(24*n^3) - 49/(120*n^4) - 6421/(720*n^5) - 17183/(1260*n^6)). - _Vaclav Kotesovec_, Mar 17 2015

%e For n=4 we have 1234, 1243, 4231 and 2134 so a(4) = 4.

%p a:= proc(n) option remember; `if`(n<6, [0, 0, 1, 1, 4, 18][n+1],

%p ((2*n^3-43-17*n^2+47*n) *a(n-1)

%p -(n-2)*(n^3-13*n^2+50*n-59) *a(n-2)

%p -(n-3)*(3*n^3-28*n^2+82*n-78) *a(n-3)

%p +(-219*n^2-4*n^4+49*n^3-305+425*n) *a(n-4)

%p -(n-4)*(3*n^3-25*n^2+66*n-57) *a(n-5)

%p -(n-4)*(n-5)*(n-2)^2 *a(n-6)) / (n-3)^2)

%p end:

%p seq(a(n), n=0..25); # _Alois P. Heinz_, Jan 15 2013

%t a[n_] := a[n] = If[n<6, {0, 0, 1, 1, 4, 18}[[n+1]],

%t ((2n^3 - 43 - 17n^2 + 47n) a[n-1]

%t -(n-2)(n^3 - 13n^2 + 50n - 59) a[n-2]

%t -(n-3)(3n^3 - 28n^2 + 82n - 78) a[n-3]

%t +(-219n^2 - 4n^4 + 49n^3 - 305 + 425n) a[n-4]

%t -(n-4)(3n^3 - 25n^2 + 66n - 57) a[n-5]

%t -(n-4)(n-5)(n-2)^2 a[n-6])/(n-3)^2];

%t a /@ Range[0, 25] (* _Jean-François Alcover_, Mar 15 2021, after _Alois P. Heinz_ *)

%Y Cf. A000166, A002467, A180191, A207819, A207821.

%K nonn

%O 0,5

%A _Jon Perry_, Jan 14 2013

%E Extended beyond a(10) by _Alois P. Heinz_, Jan 15 2013