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 A362581 #17 Apr 26 2023 07:46:07 %S A362581 1,2,6,80,1750,64512,3438204,253913088,24687555750,3062092267520, %T A362581 471565937953396,88298062293762048,19753693667117055100, %U A362581 5203824518733863321600,1594426273578194363292600,562191171748426920367226880,226024705816530632892282399750 %N A362581 Number of alternating permutations on [2n+1] with 1 in position n+1. %H A362581 Alois P. Heinz, <a href="/A362581/b362581.txt">Table of n, a(n) for n = 0..242</a> %F A362581 a(n) = binomial(2*n,n)*A000111(n)^2: %F A362581 a(n) = A104345(2*n,n). %e A362581 a(0) = 1: 1. %e A362581 a(1) = 2: 213, 312. %e A362581 a(2) = 6: 23154, 24153, 25143, 34152, 35142, 45132. %p A362581 b:= proc(u, o) option remember; `if`(u+o=0, 1, %p A362581 add(b(o-1+j, u-j), j=1..u)) %p A362581 end: %p A362581 a:= n-> binomial(2*n, n)*b(n, 0)^2: %p A362581 seq(a(n), n=0..20); %o A362581 (Python) %o A362581 from itertools import accumulate %o A362581 from math import comb %o A362581 def A362581(n): %o A362581 if n <= 1: return n+1 %o A362581 blist = (0,1) %o A362581 for _ in range(n-1): %o A362581 blist = tuple(accumulate(reversed(blist),initial=0)) %o A362581 return blist[-1]**2*comb(n<<1,n) # _Chai Wah Wu_, Apr 25 2023 %Y A362581 Cf. A000111, A104345. %K A362581 nonn %O A362581 0,2 %A A362581 _Alois P. Heinz_, Apr 25 2023