login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152885 Number of descents beginning and ending with an odd number in all permutations of {1,2,...,n}. 2

%I #15 Jan 22 2023 02:37:25

%S 0,0,2,6,72,360,4320,30240,403200,3628800,54432000,598752000,

%T 10059033600,130767436800,2440992153600,36614882304000,

%U 753220435968000,12804747411456000,288106816757760000,5474029518397440000,133809610449715200000,2810001819444019200000

%N Number of descents beginning and ending with an odd number in all permutations of {1,2,...,n}.

%C a(n) is also number of descents beginning with an odd number and ending with an even number in all permutations of {1,2,...,n}. Example: a(4)=6; indeed for n=4 the only descent to be counted is 32, occurring only in 1324, 1432, 4132, 3214, 3241 and 4321.

%F a(2n) = (2n-1)!*binomial(n,2); a(2n+1) = (2n)!*binomial(n+1,2).

%F D-finite with recurrence (-n+3)*a(n) +(n-1)*a(n-1) +n*(n-1)*(n-2)*a(n-2)=0. - _R. J. Mathar_, Jul 26 2022

%F Sum_{n>=3} 1/a(n) = 8*(CoshIntegral(1) - gamma - sinh(1) + 1) = 8*(A099284 - A001620 - A073742 + 1). - _Amiram Eldar_, Jan 22 2023

%e a(6) = 360 because (i) the descent pairs can be chosen in binomial(3,2) = 3 ways, namely (3,1), (5,1), (5,3); (ii) they can be placed in 5 positions, namely (1,2),(2,3),(3,4),(4,5),(5,6); (iii) the remaining 4 entries can be permuted in 4!=24 ways; 3*5*24 = 360.

%p a := proc (n) if `mod`(n, 2) = 0 then (1/4)*factorial(n)*((1/2)*n-1) else (1/8)*(n-1)*(n+1)*factorial(n-1) end if end proc: seq(a(n), n = 1 .. 20);

%t a[n_] := (n - 1)! * Binomial[If[OddQ[n], (n + 1)/2, n/2], 2]; Array[a, 25] (* _Amiram Eldar_, Jan 22 2023 *)

%Y Cf. A152886, A152887.

%Y Cf. A001620, A073742, A099284.

%K nonn

%O 1,3

%A _Emeric Deutsch_, Jan 19 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 01:19 EDT 2024. Contains 371906 sequences. (Running on oeis4.)