OFFSET
0,2
COMMENTS
A Schroeder path of semilength n is a path from (0,0) to (2n,0) using only steps U = (1,1), H = (2,0) and D = (1,-1). This sequence considers a path and its reversal to be the same.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
The a(1)..a(3) paths are:
a(1) = 1: H, UD;
a(2) = 5: HH, UHD, UDUD, UUDD, HUD=UDH;
a(3) = 15: HHH, HUDH, UHHD, UDHUD, UDUDUD, UUHDD, UUDUDD, UUUDDD, HHUD=UDHH, HUHD=UHDH, HUDUD=UDUDH, UHDUD=UDUHD, HUUDD=UDUDH, UHUDD=UUDHD, UDUUDD=UUDDUD.
PROG
(PARI) seq(n) = { my(A=O(x^(n+2))); Vec(( -2*x - sqrt(1 - 6*x + x^2 + A) + sqrt(1 - 6*x^2 + x^4 + A)*(1 + x)/(1 - 2*x - x^2) ) / (4*x)) }
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Andrew Howroyd, Dec 19 2024
STATUS
approved