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 A077611 #34 Jan 22 2023 02:36:44 %S A077611 0,0,4,12,144,720,8640,60480,806400,7257600,108864000,1197504000, %T A077611 20118067200,261534873600,4881984307200,73229764608000, %U A077611 1506440871936000,25609494822912000,576213633515520000,10948059036794880000,267619220899430400000,5620003638888038400000 %N A077611 Number of adjacent pairs of form (odd,odd) among all permutations of {1,2,...,n}. %C A077611 a(n) is also the number of permutations of [n+1] starting and ending with an even number. - _Olivier Gérard_, Nov 07 2011 %H A077611 Vincenzo Librandi, <a href="/A077611/b077611.txt">Table of n, a(n) for n = 1..400</a> %F A077611 a(n) = ceiling(n/2)*ceiling(n/2-1)*(n-1)!. Proof: There are ceiling(n/2) * ceiling(n/2-1) pairs (r, s) with r and s odd and distinct. For each pair, there are n-1 places it can occur in a permutation and (n-2)! possible arrangements of the other numbers. %F A077611 a(n) = (n-1)!*(2*n*(n-1)-(2*n-1)*(-1)^n-1)/8. - _Bruno Berselli_, Nov 07 2011 %F A077611 Sum_{n>=3} 1/a(n) = 4*(CoshIntegral(1) - gamma - sinh(1) + 1) = 4*(A099284 - A001620 - A073742 + 1). - _Amiram Eldar_, Jan 22 2023 %e A077611 For n=4, the a(4) = 12 permutations of degree 5 starting and ending with an even number are 21354, 21534, 23154, 23514, 25134, 25314, 41352, 41532, 43152, 43512, 45132, 45312. %t A077611 Table[Ceiling[n/2] Ceiling[n/2 - 1] (n - 1)!, {n, 22}] (* _Michael De Vlieger_, Aug 20 2017 *) %o A077611 (Magma) [Factorial(n-1)*(2*n*(n-1)-(2*n-1)*(-1)^n-1)/8 : n in [1..30]]; // _Vincenzo Librandi_, Nov 16 2011 %Y A077611 Cf. A052618, A077612, A077613. %Y A077611 Cf. A001620, A073742, A099284. %K A077611 nonn %O A077611 1,3 %A A077611 _Leroy Quet_, _Frank Ruskey_, and _Dean Hickerson_, Nov 11 2002