This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A152886 #16 Jan 22 2023 02:36:55 %S A152886 0,0,0,6,24,360,2160,30240,241920,3628800,36288000,598752000, %T A152886 7185024000,130767436800,1830744115200,36614882304000,585838116864000, %U A152886 12804747411456000,230485453406208000,5474029518397440000,109480590367948800000,2810001819444019200000 %N A152886 Number of descents beginning and ending with an even number in all permutations of {1,2,...,n}. %F A152886 a(2n) = (2n-1)!*binomial(n,2); a(2n+1) = (2n)!*binomial(n,2). %F A152886 D-finite with recurrence +(-n+4)*a(n) +(n-1)*a(n-1) +(n-2)*(n-1)^2*a(n-2)=0. - _R. J. Mathar_, Jul 31 2022 %F A152886 Sum_{n>=4} 1/a(n) = 2*(CoshIntegral(1) - gamma - 3*e + 8) = 2*(A099284 - A001620 - 3 * A001113 + 8). - _Amiram Eldar_, Jan 22 2023 %e A152886 a(7) = 2160 because (i) the descent pairs can be chosen in binomial(3,2) = 3 ways, namely (4,2), (6,2), (6,4); (ii) they can be placed in 6 positions, namely (1,2),(2,3),(3,4),(4,5),(5,6),(6,7); (iii) the remaining 5 entries can be permuted in 5! = 120 ways; 3*6*120 = 2160. %p A152886 a := proc (n) if `mod`(n, 2) = 0 then factorial(n-1)*binomial((1/2)*n, 2) else factorial(n-1)*binomial((1/2)*n-1/2, 2) end if end proc: seq(a(n), n = 1 .. 22); %t A152886 a[n_] := (n - 1)! * Binomial[If[OddQ[n], (n - 1)/2, n/2], 2]; Array[a, 25] (* _Amiram Eldar_, Jan 22 2023 *) %Y A152886 Cf. A152885, A152887. %Y A152886 Cf. A001113, A001620, A099284. %K A152886 nonn %O A152886 1,4 %A A152886 _Emeric Deutsch_, Jan 19 2009