A373567 Expansion of x + 1/(-x - 1/(-x - 1/(-x + 1))).
1, 4, 6, 14, 31, 70, 157, 353, 793, 1782, 4004, 8997, 20216, 45425, 102069, 229347, 515338, 1157954, 2601899, 5846414, 13136773, 29518061, 66326481, 149034250, 334876920, 752461609, 1690765888, 3799116465, 8536537209, 19181424995, 43100270734, 96845429254
Offset: 0
References
- L. Carlitz and R. Scoville, Up-down sequences, Duke Math. J. (39) (1972), 583-598.
Links
- Sela Fried, A formula for the number of up-down words, arXiv:2503.02005 [math.CO], 2025.
- Emma L. L. Gao, Sergey Kitaev, and Philip B. Zhang, Pattern-avoiding alternating words, arXiv:1505.04078 [math.CO], 2015.
- Index entries for linear recurrences with constant coefficients, signature (2,1,-1).
Programs
-
Mathematica
CoefficientList[Series[x + 1/(-x - 1/(-x - 1/(-x + 1))), {x, 0, 31}], x] (* Michael De Vlieger, Jun 10 2024 *)
Formula
a(n) = [x^n] (x^4 - x^3 - 3*x^2 + 2*x + 1) / (x^3 - x^2 - 2*x + 1).
Comments