OFFSET
0,2
COMMENTS
Permanent of the n X n (0, 1)-matrix with (i, j)-th entry equal to 0 iff (i=1, j=n), (i=2, j=1), (i=3, j=n), (i=4, j=1), ... - Simone Severini, Oct 17 2004
a(n) is the number of runs of odd entries in all permutations of {1,2,...,n+1}. Example: a(2)=8 because in the permutations 123, 132, 213, 231, 312 and 321 we have a total of 2+1+1+1+1+2 runs of odd entries. - Emeric Deutsch, Dec 14 2008
a(n) is the number of permutations of [n+2] whose first place is even and last place is odd (or any equivalent definition with two separate places in a permutation). - Olivier Gérard, Nov 07 2011
LINKS
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 563.
FORMULA
E.g.f.: -1/(-1+x)^2/(-1+x^2).
Recurrence: {a(0)=1, a(1)=2, (-n^2-5*n-4)*a(n)+a(n+2)-2*a(n+1)=0.}.
a(n) = (1/8*(-1)^(-n)+1/4*n^2+n+7/8)*n! for n>0.
From Emeric Deutsch, Dec 14 2008: (Start)
a(n) = n!*floor((n+2)/2)*ceiling((n+2)/2).
a(n) = Sum_{k>=1} (k*A152666(n+1,k)). (End)
a(n) = n!*A002620(n+2). - R. J. Mathar, Nov 27 2011
Sum_{n>=0} 1/a(n) = 4*(sinh(1) + gamma - CoshIntegral(1)) - 2 = 4*(A073742 + A001620 - A099284) - 2. - Amiram Eldar, Jan 22 2023
EXAMPLE
The a(2) = 8 permutations of [4] starting with an even number and ending with an odd number are: 2143, 2341, 2413, 2431, 4123, 4213, 4231, 4321.
MAPLE
spec := [S, {S=Prod(Sequence(Z), Sequence(Z), Sequence(Prod(Z, Z)))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
a := proc (n) options operator, arrow: factorial(n)*floor((1/2)*n+1)*ceil((1/2)*n+1) end proc; seq(a(n), n = 0 .. 20); # Emeric Deutsch, Dec 14 2008
MATHEMATICA
With[{nn=20}, CoefficientList[Series[1/((1-x)^2*(1-x^2)), {x, 0, nn}], x] Range[ 0, nn]!] (* Harvey P. Dale, Jun 01 2019 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved