login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209256 Number of permutations of [n] that contain at least two fixed points in a succession. 1
0, 0, 1, 1, 4, 18, 93, 579, 4165, 34031, 311528, 3158978, 35154907, 426029455, 5585287179, 78767551059, 1189090451364, 19133023344034, 326894939779865, 5910529926220115, 112753567098061553, 2263304875358959543, 47687055915645538384, 1052290471481700378570 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
A succession of a permutation p is the appearance of [k,k+1], e.g. in 23541, 23 is a succession.
LINKS
FORMULA
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
EXAMPLE
For n=4 we have 1234, 1243, 4231 and 2134 so a(4) = 4.
MAPLE
a:= proc(n) option remember; `if`(n<6, [0, 0, 1, 1, 4, 18][n+1],
((2*n^3-43-17*n^2+47*n) *a(n-1)
-(n-2)*(n^3-13*n^2+50*n-59) *a(n-2)
-(n-3)*(3*n^3-28*n^2+82*n-78) *a(n-3)
+(-219*n^2-4*n^4+49*n^3-305+425*n) *a(n-4)
-(n-4)*(3*n^3-25*n^2+66*n-57) *a(n-5)
-(n-4)*(n-5)*(n-2)^2 *a(n-6)) / (n-3)^2)
end:
seq(a(n), n=0..25); # Alois P. Heinz, Jan 15 2013
MATHEMATICA
a[n_] := a[n] = If[n<6, {0, 0, 1, 1, 4, 18}[[n+1]],
((2n^3 - 43 - 17n^2 + 47n) a[n-1]
-(n-2)(n^3 - 13n^2 + 50n - 59) a[n-2]
-(n-3)(3n^3 - 28n^2 + 82n - 78) a[n-3]
+(-219n^2 - 4n^4 + 49n^3 - 305 + 425n) a[n-4]
-(n-4)(3n^3 - 25n^2 + 66n - 57) a[n-5]
-(n-4)(n-5)(n-2)^2 a[n-6])/(n-3)^2];
a /@ Range[0, 25] (* Jean-François Alcover, Mar 15 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A200717 A346763 A121584 * A367282 A364475 A059227
KEYWORD
nonn
AUTHOR
Jon Perry, Jan 14 2013
EXTENSIONS
Extended beyond a(10) by Alois P. Heinz, Jan 15 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)