|
|
A000313
|
|
Number of permutations of length n with 3 consecutive ascending pairs.
(Formerly M3633 N1477)
|
|
10
|
|
|
0, 0, 0, 1, 4, 30, 220, 1855, 17304, 177996, 2002440, 24474285, 323060540, 4581585866, 69487385604, 1122488536715, 19242660629360, 348933579412440, 6673354706262864, 134252194678935321, 2834212998777523380, 62651024183503148470, 1447238658638922729580
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Temporary remark: there may be some issues with respect to the offset of this sequence in the formula and program sections. - Joerg Arndt, Nov 16 2014
|
|
REFERENCES
|
F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (n*(n+1)!/6)*sum((-1)^k/k!, k=0..n).
a(n) = round( (exp(-1)*(n+1)!+(-1)^n)*n/6 ). - Mark van Hoeij, Oct 25 2011
G.f.: hypergeom([2, 4],[],x/(x+1))/(x+1)^4. - Mark van Hoeij, Nov 07 2011
a(1) = 0, a(n) = (n-2)*(n-1)*(!(n-2))/6 = (n-2)*(n-1)*A000166(n-2)/6, for n >= 2. - Todd Silvestri, Nov 15 2014
D-finite with recurrence (-n+4)*a(n) +(n-1)*(n-4)*a(n-1) +(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Aug 01 2022
|
|
MAPLE
|
series(hypergeom([2, 4], [], x/(x+1))/(x+1)^4, x=0, 30); # Mark van Hoeij, Nov 07 2011
a := n -> simplify(hypergeom([4-n, 2], [], 1))*(-1)^n*(n-1)*(n-2)*(n-3)/6: seq(a(n), n=1..23); # Peter Luschny, Nov 19 2014
|
|
MATHEMATICA
|
Table[(n*(n + 1)!/6)*Sum[(-1)^k/k!, {k, 0, n}], {n, -1, 25}] (* T. D. Noe, Jun 19 2012 *)
a[1]:=0; a[n_Integer/; n>=2]:=(n-2) (n-1) Subfactorial[n-2]/6 (* Todd Silvestri, Nov 15 2014 *)
|
|
PROG
|
(Sage)
a = lambda n: (n-2)*(n-1)*sloane.A000166(n-2)/6 if n>2 else 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|