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!)
A323798 Number of permutations p of [n] such that max_{j=1..n} |p(j)-j| = 2. 2
0, 3, 9, 23, 60, 151, 366, 877, 2088, 4937, 11621, 27285, 63944, 149652, 349924, 817712, 1910027, 4460139, 10412815, 24306706, 56733689, 132411638, 309022917, 721175422, 1682988807, 3927486177, 9165229371, 21387927668, 49910484308, 116469784820, 271790117108 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
FORMULA
G.f.: x^3*(x^2-3)/((x^2+x-1)*(x^5-2*x^3-2*x+1)).
EXAMPLE
a(3) = 3: 231, 312, 321.
a(4) = 9: 1342, 1423, 1432, 2314, 2413, 3124, 3142, 3214, 3412.
a(5) = 23: 12453, 12534, 12543, 13425, 13524, 14235, 14253, 14325, 14523, 21453, 21534, 21543, 23145, 23154, 24135, 24153, 31245, 31254, 31425, 31524, 32145, 32154, 34125.
CROSSREFS
Column k=2 of A130152.
Sequence in context: A027058 A146818 A309301 * A180488 A318860 A318818
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jan 28 2019
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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)