A005717 Construct triangle in which n-th row is obtained by expanding (1 + x + x^2)^n and take the next-to-central column.
1, 2, 6, 16, 45, 126, 357, 1016, 2907, 8350, 24068, 69576, 201643, 585690, 1704510, 4969152, 14508939, 42422022, 124191258, 363985680, 1067892399, 3136046298, 9217554129, 27114249960, 79818194925, 235128465026, 693085098852, 2044217638456, 6032675068061
Offset: 1
Examples
G.f. = x + 2*x^2 + 6*x^3 + 16*x^4 + 45*x^5 + 126*x^6 + 357*x^7 + ...
References
- Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000 (Terms 1 to 200 computed by T. D. Noe; terms 201 to 1000 by G. C. Greubel, Jan 15 2017)
- Kassie Archer and Christina Graves, A new statistic on Dyck paths for counting 3-dimensional Catalan words, arXiv:2205.09686 [math.CO], 2022.
- Jean-Luc Baril, Sergey Kirgizov, José L. Ramírez, and Diego Villamizar, The Combinatorics of Motzkin Polyominoes, arXiv:2401.06228 [math.CO], 2024. See page 13.
- Emeric Deutsch, Ordered trees with prescribed root degrees, node degrees, and branch lengths, Discrete Mathematics 282 (2004), 89-94.
- Ricardo Gómez Aíza, Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis, arXiv:2402.16111 [math.CO], 2024. See p. 23.
- Richard K. Guy, Letter to N. J. A. Sloane, 1987.
- Stanislav Krymski and Alexander Okhotin, Longer Shortest Strings in Two-Way Finite Automata, in: Jirásková G., Pighizzini G. (eds) Descriptional Complexity of Formal Systems. DCFS 2020. Lecture Notes in Computer Science, vol 12442. Springer, Cham.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, Une méthode pour obtenir la fonction génératrice d'une série, arXiv:0912.0072 [math.NT], 2009; FPSAC 1993, Florence. Formal Power Series and Algebraic Combinatorics.
- Mark Shattuck, Subword Patterns in Smooth Words, Enum. Comb. Appl. (2024) Vol. 4, No. 4, Art. No. S2R32. See p. 6.
- Chenying Wang, Piotr Miska, and István Mező, The r-derangement numbers, Discrete Mathematics 340(7) (2017), 1681-1692.
- Eric Weisstein's World of Mathematics, Trinomial Coefficient.
Crossrefs
Programs
-
Maple
seq(add(binomial(i, k) *binomial(i-k, k+1), k=0..floor(i/2)), i=1..30); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001 M:= proc(n) option remember; `if` (n<2, 1, (3*(n-1)*M(n-2) +(2*n+1) *M(n-1))/ (n+2)) end: A005717 := n -> n*M(n-1): seq(A005717(i), i=1..27); # Peter Luschny, Sep 12 2011 a := n -> simplify(GegenbauerC(n,-n-1,-1/2)): seq(a(n), n=0..28); # Peter Luschny, May 07 2016
-
Mathematica
Table[Coefficient[Expand[(1+x+x^2)^n], x, n-1], {n, 1, 40}] Table[n*Hypergeometric2F1[(1 - n)/2, 1 - n/2, 2, 4], {n, 29}] (* Arkadiusz Wesolowski, Aug 13 2012 *) Table[GegenbauerC[n,-n-1,-1/2],{n,0,100}] (* Emanuele Munarini, Oct 20 2016 *)
-
Maxima
makelist(ultraspherical(n,-n-1,-1/2),n,0,12); /* Emanuele Munarini, Oct 20 2016 */
-
PARI
{a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n-1))}; /* Michael Somos, Sep 09 2002 */
-
PARI
{a(n) = if( n<0, 0, n * polcoeff( serreverse( x / (1 + x + x^2) + x * O(x^n)), n))}; /* Michael Somos, Oct 10 2003 */
-
PARI
N=10^3; x='x+'x*O('x^N); gf = 2*x/(1-2*x-3*x^2+(1-x)*sqrt(1-2*x-3*x^2)); v005717 = Vec(gf); /* Joerg Arndt, Aug 16 2012 */
-
Python
def A(): a, b, n = 0, 1, 1 while True: yield b n += 1 a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1)) A005717 = A() print([next(A005717) for in range(29)]) # _Peter Luschny, May 16 2016
Formula
a(n) = Sum_{k=1..n} T(k, k-1), where T is the array defined in A025177.
G.f.: 2*x/(1-2*x-3*x^2+(1-x)*sqrt(1-2*x-3*x^2)). - Emeric Deutsch, Aug 14 2002
E.g.f.: exp(x) * I_1(2x), where I_1 is the Bessel function. - Michael Somos, Sep 09 2002
a(n) = A111808(n,n-1). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..floor((n-1)/3)} (-1)^k * binomial(n,k) * binomial(2n-2-3k, n-1). - David Callan, Jul 03 2006
From Paul Barry, Feb 05 2007: (Start)
a(n) = n*Sum_{k=0..floor((n-1)/2), C(n-1,2k)*C(k)}, C(n) = A000108(n).
a(n) = Sum_{k=0..floor((n-1)/2)} (2k+1)*C(n,2k+1)*C(k).
a(n) = Sum_{k=0..n-1} ( Sum_{j=0..floor(k/2)} C(k,2j)*C(2j+1,j) ). (End)
a(n) = n*A001006(n-1). - Paul Barry, Oct 05 2009
a(n) = Sum_{i=0..floor(n/2)} C(n+1,n-i) * C(n-i,i). - Shanzhen Gao, Apr 20 2010
D-finite with recurrence: (n+1)*a(n) - 3*n*a(n-1) - (n+3)*a(n-2) + 3*(n-2)*a(n-3) = 0. - R. J. Mathar, Nov 28 2011
a(n) ~ 3^(n+1/2)/(2*sqrt(Pi*n)). - Vaclav Kotesovec, Aug 09 2013
0 = a(n) * 3*(n+1)*(n+2) + a(n+1) * (n+2)*(2*n+3) - a(n+2) * (n+1)*(n+3) for all n in Z. - Michael Somos, Apr 03 2014
G.f.: z*M(z)/(1-z-2*z^2*M(z)), where M(z) is the g.f. of Motzkin paths. - José Luis Ramírez Ramírez, Apr 19 2015
Working with an offset of 0, a(n) = [x^n](1 + x + x^2)^(n+1); binomial transform is A076540. - Peter Bala, Jun 15 2015
a(n) = GegenbauerC(n,-n-1,-1/2). - Peter Luschny, May 07 2016
a(n) = (-1)^(n+1) * n * hypergeom([3/2, 1-n], [3], 4). - Vladimir Reshetnikov, Sep 28 2016
a(n) = Sum_{k=0..n-1} binomial(n,k)*binomial(n-k, k+1) [Krymski and Okhotin]. - Michel Marcus, Dec 04 2020
Extensions
More terms from Erich Friedman, Jun 01 2001
Comments