A001266 One-half the number of permutations of length n without rising or falling successions.
0, 0, 1, 7, 45, 323, 2621, 23811, 239653, 2648395, 31889517, 415641779, 5830753109, 87601592187, 1403439027805, 23883728565283, 430284458893701, 8181419271349931, 163730286973255373, 3440164703027845395, 75718273707281368117, 1742211593431076483419
Offset: 2
Keywords
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
- Seiichi Manyama, Table of n, a(n) for n = 2..450 (first 199 terms from Alois P. Heinz)
- J. Riordan, A recurrence for permutations without rising or falling successions, Ann. Math. Statist. 36 (1965), 708-710.
- Eric Weisstein's World of Mathematics, Hamiltonian Path
- Eric Weisstein's World of Mathematics, Path Complement Graph
Programs
-
Maple
S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) end: a:= n-> coeff(S(n), t, 0)/2: seq(a(n), n=2..25); # Alois P. Heinz, Jan 11 2013
-
Mathematica
S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t + 2*t^2}[[n+1]], Expand[(n+1-t)*S[n-1] - (1-t)*(n-2+3*t)*S[n-2] - (1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4]]]; a[n_] := Coefficient[S[n], t, 0]/2; Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Mar 24 2014, after Alois P. Heinz *) CoefficientList[Series[((Exp[(1 + x)/((-1 + x) x)] (1 + x) Gamma[0, (1 + x)/((-1 + x) x)])/((-1 + x) x) - x - 1)/(2 x), {x, 0, 20}], x] (* Eric W. Weisstein, Apr 11 2018 *) RecurrenceTable[{a[n] == (n + 1) a[n - 1] - (n - 2) a[n - 2] - (n - 5) a[n - 3] + (n - 3) a[n - 4], a[0] == a[1] == 1/2, a[2] == a[3] == 0}, a, {n, 2, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
Formula
Extensions
More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 16 2001
Comments