A180187 Number of successions in all the permutations p of [n] such that p(1)=1 and having no 3-sequences. A succession of a permutation p is a position i such that p(i +1) - p(i) = 1.
0, 1, 0, 3, 14, 72, 468, 3453, 28782, 267831, 2752828, 30984336, 379125192, 5011756625, 71190365580, 1081514329155, 17499480412746, 300473929597320, 5457031426340748, 104520033700333069, 2105651342251571562
Offset: 1
Keywords
Examples
a(4)=3 because in 1*243, 1324, 13*42, 142*3, 1432 we have 3 successions (marked *).
References
- Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012. - From N. J. A. Sloane, Sep 15 2012
Crossrefs
A column of A216718. - N. J. A. Sloane, Sep 15 2012
Programs
-
Maple
d[0] := 1: for n to 51 do d[n] := n*d[n-1]+(-1)^n end do: seq(sum(k*binomial(n-k, k)*d[n-1-k], k = 0 .. floor((1/2)*n)), n = 1 .. 22);
-
Mathematica
a[0] = 1; a[n_] := a[n] = n*a[n - 1] + (-1)^n; f[n_] := Sum[k*Binomial[n - k, k]*a[n - k - 1], {k, 0, n/2}]; Array[f, 21] (* Robert G. Wilson v, Apr 01 2011 *) a[n_] := Sum[k Binomial[n - k, k] Subfactorial[n - k - 1], {k, 0, n/2}]; a /@ Range[1, 21] (* Jean-François Alcover, Oct 29 2019 *)
Comments