cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A374162 a(n) is the number of permutations of size n ending with n whose n left-to-right maxima are consecutive and nonadjacent.

Original entry on oeis.org

1, 0, 1, 2, 8, 36, 198, 1272, 9384, 78240, 728040, 7482960, 84224160, 1030569120, 13623366960, 193515477120, 2939860748160, 47568519613440, 816772822750080, 14833749363552000, 284114908317542400, 5723753780712844800, 120995656719515424000, 2678008828724659584000
Offset: 1

Views

Author

Stefano Spezia, Jun 30 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=Sum[(n-k)!Binomial[n-k-1,k-2],{k,2,Ceiling[n/2]}]; Array[a,24]

Formula

a(1) = 1 and a(n) = Sum_{k=2..ceiling(n/2)} (n-k)!*binomial(n-k-1, k-2) for n > 1.
Showing 1-1 of 1 results.