OFFSET
0,5
LINKS
Marilena Barnabei, Flavio Bonetti, Niccolò Castronuovo, and Matteo Silimbani, Pattern avoiding alternating involutions, arXiv:2206.13877 [math.CO], 2022.
Sook Min, The Enumeration of Involutions of Doubly Alternating Baxter Permutations, Journal of the Chungcheong Mathematical Society, 34(3) (2021), 253-257.
PROG
(Python)
def b(n):
if (0<=n<=3):
return 1
if (n==4):
return 2
if (n%2==1):
t=0
for k in range(1, ((n+1)//2)):
t+=b(2*k-2)*b(n-2*k)
return t
else:
s=0
for j in range(round(n/4), (n//2)):
s+=b(4*j-n)*b(n-2*j-1)
return b(n-1)+s
for i in range(30):
print(str(i)+': '+str(b(i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Sook Min, Sep 06 2021
STATUS
approved