login
One-half the number of permutations of length n with exactly 1 rising or falling successions.
(Formerly M1528 N0598)
12

%I M1528 N0598 #25 Mar 27 2015 03:23:48

%S 0,0,1,2,5,20,115,790,6217,55160,545135,5938490,70686805,912660508,

%T 12702694075,189579135710,3019908731105,51139445487680,

%U 917345570926087,17376071107513090,346563420097249645,7259714390232227300,159352909727731210835,3657569576966074846118

%N One-half the number of permutations of length n with exactly 1 rising or falling successions.

%C (1/2) times number of permutations of 12...n such that exactly one of the following occurs: 12, 23, ..., (n-1)n, 21, 32, ..., n(n-1).

%C Partial sums seem to be in A000239. - _Ralf Stephan_, Aug 28 2003

%D F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.

%D J. Riordan, A recurrence for permutations without rising or falling successions. Ann. Math. Statist. 36 (1965), 708-710.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Alois P. Heinz, <a href="/A000130/b000130.txt">Table of n, a(n) for n = 0..200</a>

%F Coefficient of t^1 in S[n](t) defined in A002464, divided by 2.

%F a(n) ~ exp(-2) * n!. - _Vaclav Kotesovec_, Sep 11 2014

%p S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2]

%p [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2)

%p -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4)))

%p end:

%p a:= n-> coeff(S(n), t, 1)/2:

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Dec 21 2012

%t 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, 1]/2; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Mar 10 2014, after _Alois P. Heinz_ *)

%Y Cf. A002464, A086853. Equals A086852/2. A diagonal of A010028.

%K nonn

%O 0,4

%A _N. J. A. Sloane_