The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A185652 Number of permutations of [n] having a shortest ascending run of length 2. 3
0, 0, 1, 0, 5, 18, 89, 519, 3853, 27555, 233431, 2167152, 21596120, 232817282, 2718706924, 33814848445, 448311181346, 6319365554730, 94225534689624, 1481940898130323, 24536143182460549, 426432943716156580, 7762187693343502658, 147704506384475066381 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n!, where c = 0.45178068752734823... . - Vaclav Kotesovec, Sep 06 2014
EXAMPLE
a(2) = 1: 12.
a(4) = 5: 1324, 1423, 2314, 2413, 3412.
a(5) = 18: 12435, 12534, 13245, 13425, 13524, 14235, 14523, 15234, 23145, 23415, 23514, 24135, 24513, 25134, 34125, 34512, 35124, 45123.
MATHEMATICA
A[n_, k_] := A[n, k] = Module[{b}, b[u_, o_, t_] := b[u, o, t] = If[t + o <= k, (u + o)!, Sum[b[u + i - 1, o - i, Min[k, t] + 1], {i, 1, o}] + If[t <= k, u (u + o - 1)!, Sum[b[u - i, o + i - 1, 1], {i, 1, u}]]]; Sum[b[j - 1, n - j, 1], {j, 1, n}]];
a[n_] := A[n, 2] - A[n, 1];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 26 2021, after Alois P. Heinz in A064315 *)
CROSSREFS
Column k=2 of A064315.
Cf. A086089 (3*sqrt(3)/(2*Pi)).
Sequence in context: A213190 A151490 A282475 * A009305 A097574 A113023
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 29 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 May 24 12:09 EDT 2024. Contains 372773 sequences. (Running on oeis4.)