OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1000
L. Guo and W. Sit, Enumeration and generating functions of Rota-Baxter words, Math. Comp. Sci. (2010). In G. Regensburger, M. Rosenkranz, and W. Sit, eds., Algebraic and Algorithmic Aspects of Differential and Integral Operators (AADIOS), Sp. Issue, Math. C. Sc., 4 (2,3) (2010).
FORMULA
a(n) = 3*2^(n-1)*A000108(n).
G.f.: (3 - 4*t - 3*sqrt(1-8*t))/(8*t).
(n+1)*a(n) = 4*(2*n-1)*a(n-1). - R. J. Mathar, Jul 24 2012
a(n) = (n+2) * A000257(n). - F. Chapoton, Feb 26 2024
EXAMPLE
For n = 2, the a(2) = 12 associate Rota-Baxter words are: xP(xP(x)), xP(xP(x))x, P(xP(x))x, xP(P(x)x), xP(P(x)x)x, P(P(x)x)x, xP(xP(x)x), xP(xP(x)x)x, P(xP(x)x)x, xP(x)xP(x), xP(x)xP(x)x, P(x)xP(x)x.
MATHEMATICA
CoefficientList[Series[(3-4x-3Sqrt[1-8x])/(8x), {x, 0, 40}], x]
a[0] = 1; a[n_]:= 3*2^(n-1) CatalanNumber[n]; Table[a[n], {n, 0, 20}] (* Indranil Ghosh, Mar 05 2017 *)
PROG
(PARI) a(n) = if(n==0, 1, 3*2^(n-1)*(binomial(2*n, n)/(n+1))); \\ Indranil Ghosh, Mar 05 2017
(Python)
import math
f = math.factorial
def C(n, r): return f(n)/f(r)/f(n-r)
def A181282(n): return 1 if n==0 else 3*2**(n-1)*(C(2*n, n)/(n+1)) # Indranil Ghosh, Mar 05 2017
(Magma) [1] cat [3*2^(n-1)*Catalan(n): n in [1..40]]; // G. C. Greubel, Jan 04 2023
(SageMath) [3*2^(n-1)*catalan_number(n) -int(n==0)/2 for n in range(41)] # G. C. Greubel, Jan 04 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
William Sit (wyscc(AT)sci.ccny.cuny.edu), Oct 11 2010
STATUS
approved