cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 16 results. Next

A002426 Central trinomial coefficients: largest coefficient of (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, 616227, 1787607, 5196627, 15134931, 44152809, 128996853, 377379369, 1105350729, 3241135527, 9513228123, 27948336381, 82176836301, 241813226151, 712070156203, 2098240353907, 6186675630819
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n + 1 edges, having root of odd degree and nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 02 2002
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), running from (0,0) to (n,0) (i.e., grand Motzkin paths of length n). For example, a(3) = 7 because we have HHH, HUD, HDU, UDH, DUH, UHD and DHU. - Emeric Deutsch, May 31 2003
Number of lattice paths from (0,0) to (n,n) using steps (2,0), (0,2), (1,1). It appears that 1/sqrt((1 - x)^2 - 4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1). - Joerg Arndt, Jul 01 2011
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Binomial transform of A000984, with interpolated zeros. - Paul Barry, Jul 01 2003
Number of leaves in all 0-1-2 trees with n edges, n > 0. (A 0-1-2 tree is an ordered tree in which every vertex has at most two children.) - Emeric Deutsch, Nov 30 2003
a(n) is the number of UDU-free paths of n + 1 upsteps (U) and n downsteps (D) that start U. For example, a(2) = 3 counts UUUDD, UUDDU, UDDUU. - David Callan, Aug 18 2004
Diagonal sums of triangle A063007. - Paul Barry, Aug 31 2004
Number of ordered ballots from n voters that result in an equal number of votes for candidates A and B in a three candidate election. Ties are counted even when candidates A and B lose the election. For example, a(3) = 7 because ballots of the form (voter-1 choice, voter-2 choice, voter-3 choice) that result in equal votes for candidates A and B are the following: (A,B,C), (A,C,B), (B,A,C), (B,C,A), (C,A,B), (C,B,A) and (C,C,C). - Dennis P. Walsh, Oct 08 2004
a(n) is the number of weakly increasing sequences (a_1,a_2,...,a_n) with each a_i in [n]={1,2,...,n} and no element of [n] occurring more than twice. For n = 3, the sequences are 112, 113, 122, 123, 133, 223, 233. - David Callan, Oct 24 2004
Note that n divides a(n+1) - a(n). In fact, (a(n+1) - a(n))/n = A007971(n+1). - T. D. Noe, Mar 16 2005
Row sums of triangle A105868. - Paul Barry, Apr 23 2005
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), starting at (0,0), staying weakly above the x-axis (i.e., left factors of Motzkin paths) and having no H steps on the x-axis. Example: a(3) = 7 because we have UDU, UHD, UHH, UHU, UUD, UUH and UUU. - Emeric Deutsch, Oct 07 2007
Equals right border of triangle A152227; starting with offset 1, the row sums of triangle A152227. - Gary W. Adamson, Nov 29 2008
Starting with offset 1 = iterates of M * [1,1,1,...] where M = a tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super and subdiagonals. - Gary W. Adamson, Jan 07 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
a(n) is prime for n = 2, 3 and 4, with no others for n <= 10^5 (E. W. Weisstein, Mar 14 2005). It has apparently not been proved that no [other] prime central trinomials exist. - Jonathan Vos Post, Mar 19 2010
a(n) is not divisible by 3 for n whose base-3 representation contains no 2 (A005836).
a(n) = number of (n-1)-lettered words in the alphabet {1,2,3} with as many occurrences of the substring (consecutive subword) [1,2] as those of [2,1]. See the papers by Ekhad-Zeilberger and Zeilberger. - N. J. A. Sloane, Jul 05 2012
a(n) = coefficient of x^n in (1 + x + x^2)^n. - L. Edson Jeffery, Mar 23 2013
a(n) is the number of ordered pairs (A,B) of subsets of {1,2,...,n} such that (i.) A and B are disjoint and (ii.) A and B contain the same number of elements. For example, a(2) = 3 because we have: ({},{}) ; ({1},{2}) ; ({2},{1}). - Geoffrey Critzer, Sep 04 2013
Also central terms of A082601. - Reinhard Zumkeller, Apr 13 2014
a(n) is the number of n-tuples with entries 0, 1, or 2 and with the sum of entries equal to n. For n=3, the seven 3-tuples are (1,1,1), (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), and (2,1,0). - Dennis P. Walsh, May 08 2015
The series 2*a(n) + 3*a(n+1) + a(n+2) = 2*A245455(n+3) has Hankel transform of L(2n+1)*2^n, offset n = 1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
The series (2*a(n) + 3*a(n+1) + a(n+2))/2 = A245455(n+3) has Hankel transform of L(2n+1), offset n=1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
Conjecture: An integer n > 3 is prime if and only if a(n) == 1 (mod n^2). We have verified this for n up to 8*10^5, and proved that a(p) == 1 (mod p^2) for any prime p > 3 (cf. A277640). - Zhi-Wei Sun, Nov 30 2016
This is the analog for Coxeter type B of Motzkin numbers (A001006) for Coxeter type A. - F. Chapoton, Jul 19 2017
a(n) is also the number of solutions to the equation x(1) + x(2) + ... + x(n) = 0, where x(1), ..., x(n) are in the set {-1,0,1}. Indeed, the terms in (1 + x + x^2)^n that produce x^n are of the form x^i(1)*x^i(2)*...*x^i(n) where i(1), i(2), ..., i(n) are in {0,1,2} and i(1) + i(2) + ... + i(n) = n. By setting j(t) = i(t) - 1 we obtain that j(1), ..., j(n) satisfy j(1) + ... + j(n) =0 and j(t) in {-1,0,1} for all t = 1..n. - Lucien Haddad, Mar 10 2018
If n is a prime greater than 3 then a(n)-1 is divisible by n^2. - Ira M. Gessel, Aug 08 2021
Let f(m) = ceiling((q+log(q))/log(9)), where q = -log(log(27)/(2*m^2*Pi)) then f(a(n)) = n, for n > 0. - Miko Labalan, Oct 07 2024
Diagonal of the rational function 1 / (1 - x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 23 2025

Examples

			For n = 2, (x^2 + x + 1)^2 = x^4 + 2*x^3 + 3*x^2 + 2*x + 1, so a(2) = 3. - _Michael B. Porter_, Sep 06 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 78 and 163, #19.
  • L. Euler, Exemplum Memorabile Inductionis Fallacis, Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 15, p. 59.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 575.
  • P. Henrici, Applied and Computational Complex Analysis. Wiley, NY, 3 vols., 1974-1986. (Vol. 1, p. 42.)
  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 579.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 74.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 6.3.8.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 22.
  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346. See p. 341.

Crossrefs

INVERT transform is A007971. Partial sums are A097893. Squares are A168597.
Main column of A027907. Column k=2 of A305161. Column k=0 of A328347. Column 1 of A201552(?).
Cf. A001006, A002878, A005043, A005717, A082758 (bisection), A273055 (bisection), A102445, A113302, A113303, A113304, A113305 (divisibility of central trinomial coefficients), A152227, A277640.

Programs

  • Haskell
    a002426 n = a027907 n n  -- Reinhard Zumkeller, Jan 22 2013
    
  • Magma
    P:=PolynomialRing(Integers()); [Max(Coefficients((1+x+x^2)^n)): n in [0..26]]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    A002426 := proc(n) local k;
        sum(binomial(n, k)*binomial(n-k, k), k=0..floor(n/2));
    end proc: # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # Alternatively:
    a := n -> simplify(GegenbauerC(n,-n,-1/2)):
    seq(a(n), n=0..29); # Peter Luschny, May 07 2016
  • Mathematica
    Table[ CoefficientList[ Series[(1 + x + x^2)^n, {x, 0, n}], x][[ -1]], {n, 0, 27}] (* Robert G. Wilson v *)
    a=b=1; Join[{a,b}, Table[c=((2n-1)b + 3(n-1)a)/n; a=b; b=c; c, {n,2,100}]]; Table[Sqrt[-3]^n LegendreP[n,1/Sqrt[-3]],{n,0,26}] (* Wouter Meeussen, Feb 16 2013 *)
    a[ n_] := If[ n < 0, 0, 3^n Hypergeometric2F1[ 1/2, -n, 1, 4/3]]; (* Michael Somos, Jul 08 2014 *)
    Table[4^n *JacobiP[n,-n-1/2,-n-1/2,-1/2], {n,0,29}] (* Peter Luschny, May 13 2016 *)
    a[n_] := a[n] = Sum[n!/((n - 2*i)!*(i!)^2), {i, 0, n/2}]; Table[a[n], {n, 0, 29}] (* Shara Lalo and Zagros Lalo, Oct 03 2018 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    makelist(trinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    makelist(ultraspherical(n,-n,-1/2),n,0,12); /* Emanuele Munarini, Dec 20 2016 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n))};
    
  • PARI
    /* as lattice paths: same as in A092566 but use */
    steps=[[2, 0], [0, 2], [1, 1]];
    /* Joerg Arndt, Jul 01 2011 */
    
  • PARI
    a(n)=polcoeff(sum(m=0, n, (2*m)!/m!^2 * x^(2*m) / (1-x+x*O(x^n))^(2*m+1)), n) \\ Paul D. Hanna, Sep 21 2013
    
  • Python
    from math import comb
    def A002426(n): return sum(comb(n,k)*comb(k,n-k) for k in range(n+1)) # Chai Wah Wu, Nov 15 2022
  • Sage
    A002426 = lambda n: hypergeometric([-n/2, (1-n)/2], [1], 4)
    [simplify(A002426(n)) for n in (0..29)]
    # Peter Luschny, Sep 17 2014
    
  • Sage
    def A():
        a, b, n = 1, 1, 1
        yield a
        while True:
            yield b
            n += 1
            a, b = b, ((3 * (n - 1)) * a + (2 * n - 1) * b) // n
    A002426 = A()
    print([next(A002426) for  in range(30)])  # _Peter Luschny, May 16 2016
    

Formula

G.f.: 1/sqrt(1 - 2*x - 3*x^2).
E.g.f.: exp(x)*I_0(2x), where I_0 is a Bessel function. - Michael Somos, Sep 09 2002
a(n) = 2*A027914(n) - 3^n. - Benoit Cloitre, Sep 28 2002
a(n) is asymptotic to d*3^n/sqrt(n) with d around 0.5.. - Benoit Cloitre, Nov 02 2002, d = sqrt(3/Pi)/2 = 0.4886025119... - Alec Mihailovs (alec(AT)mihailovs.com), Feb 24 2005
D-finite with recurrence: a(n) = ((2*n - 1)*a(n-1) + 3*(n - 1)*a(n-2))/n; a(0) = a(1) = 1; see paper by Barcucci, Pinzani and Sprugnoli.
Inverse binomial transform of A000984. - Vladeta Jovovic, Apr 28 2003
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, k/2)*(1 + (-1)^k)/2; a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*binomial(2*k, k). - Paul Barry, Jul 01 2003
a(n) = Sum_{k>=0} binomial(n, 2*k)*binomial(2*k, k). - Philippe Deléham, Dec 31 2003
a(n) = Sum_{i+j=n, 0<=j<=i<=n} binomial(n, i)*binomial(i, j). - Benoit Cloitre, Jun 06 2004
a(n) = 3*a(n-1) - 2*A005043(n). - Joost Vermeij (joost_vermeij(AT)hotmail.com), Feb 10 2005
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, n-k). - Paul Barry, Apr 23 2005
a(n) = (-1/4)^n*Sum_{k=0..n} binomial(2*k, k)*binomial(2*n-2*k, n-k)*(-3)^k. - Philippe Deléham, Aug 17 2005
a(n) = A111808(n,n). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..n} (((1 + (-1)^k)/2)*Sum_{i=0..floor((n-k)/2)} binomial(n, i)*binomial(n-i, i+k)*((k + 1)/(i + k + 1))). - Paul Barry, Sep 23 2005
a(n) = 3^n*Sum_{j=0..n} (-1/3)^j*C(n, j)*C(2*j, j); follows from (a) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/2)^n*Sum_{j=0..n} 3^j*binomial(n, j)*binomial(2*n-2*j, n) = (3/2)^n*Sum_{j=0..n} (1/3)^j*binomial(n, j)*binomial(2*j, n); follows from (c) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/Pi)*Integral_{x=-1..3} x^n/sqrt((3 - x)*(1 + x)) is moment representation. - Paul Barry, Sep 10 2007
G.f.: 1/(1 - x - 2x^2/(1 - x - x^2/(1 - x - x^2/(1 - ... (continued fraction). - Paul Barry, Aug 05 2009
a(n) = sqrt(-1/3)*(-1)^n*hypergeometric([1/2, n+1], [1], 4/3). - Mark van Hoeij, Nov 12 2009
a(n) = (1/Pi)*Integral_{x=-1..1} (1 + 2*x)^n/sqrt(1 - x^2) = (1/Pi)*Integral_{t=0..Pi} (1 + 2*cos(t))^n. - Eli Wolfhagen, Feb 01 2011
In general, g.f.: 1/sqrt(1 - 2*a*x + x^2*(a^2 - 4*b)) = 1/(1 - a*x)*(1 - 2*x^2*b/(G(0)*(a*x - 1) + 2*x^2*b)); G(k) = 1 - a*x - x^2*b/G(k+1); for g.f.: 1/sqrt(1 - 2*x - 3*x^2) = 1/(1 - x)*(1 - 2*x^2/(G(0)*(x - 1) + 2*x^2)); G(k) = 1 - x - x^2/G(k+1), a = 1, b = 1; (continued fraction). - Sergei N. Gladkovskii, Dec 08 2011
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*binomial(2*n-3*k-1, n-3*k)*binomial(n, k). - Gopinath A. R., Feb 10 2012
G.f.: A(x) = x*B'(x)/B(x) where B(x) satisfies B(x) = x*(1 + B(x) + B(x)^2). - Vladimir Kruchinin, Feb 03 2013 (B(x) = x*A001006(x) - Michael Somos, Jul 08 2014)
G.f.: G(0), where G(k) = 1 + x*(2 + 3*x)*(4*k + 1)/(4*k + 2 - x*(2 + 3*x)*(4*k + 2)*(4*k + 3)/(x*(2 + 3*x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 29 2013
E.g.f.: exp(x) * Sum_{k>=0} (x^k/k!)^2. - Geoffrey Critzer, Sep 04 2013
G.f.: Sum_{n>=0} (2*n)!/n!^2*(x^(2*n)/(1 - x)^(2*n+1)). - Paul D. Hanna, Sep 21 2013
0 = a(n)*(9*a(n+1) + 9*a(n+2) - 6*a(n+3)) + a(n+1)*(3*a(n+1) + 4*a(n+2) - 3*a(n+3)) + a(n+2)*(-a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = hypergeometric([-n/2, (1-n)/2], [1], 4). - Peter Luschny, Sep 17 2014
a(n) = A132885(n,0), that is, a(n) = A132885(A002620(n+1)). - Altug Alkan, Nov 29 2015
a(n) = GegenbauerC(n,-n,-1/2). - Peter Luschny, May 07 2016
a(n) = 4^n*JacobiP[n,-n-1/2,-n-1/2,-1/2]. - Peter Luschny, May 13 2016
From Alexander Burstein, Oct 03 2017: (Start)
G.f.: A(4*x) = B(-x)*B(3*x), where B(x) is the g.f. of A000984.
G.f.: A(2*x)*A(-2*x) = B(x^2)*B(9*x^2).
G.f.: A(x) = 1 + x*M'(x)/M(x), where M(x) is the g.f. of A001006. (End)
a(n) = Sum_{i=0..n/2} n!/((n - 2*i)!*(i!)^2). [Cf. Lalo and Lalo link. It is Luschny's terminating hypergeometric sum.] - Shara Lalo and Zagros Lalo, Oct 03 2018
From Peter Bala, Feb 07 2022: (Start)
a(n)^2 = Sum_{k = 0..n} (-3)^(n-k)*binomial(2*k,k)^2*binomial(n+k,n-k) and has g.f. Sum_{n >= 0} binomial(2*n,n)^2*x^n/(1 + 3*x)^(2*n+1). Compare with the g.f. for a(n) given above by Hanna.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all prime p and positive integers n and k.
Conjecture: The stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all prime p >= 5 and positive integers n and k. (End)
a(n) = A005043(n) + A005717(n) for n >= 1. - Amiram Eldar, May 17 2024
For even n, a(n) = (n-1)!!* 2^{n/2}/ (n/2)!* 2F1(-n/2,-n/2;1/2;1/4). For odd n, a(n) = n!! *2^(n/2-1/2) / (n/2-1/2)! * 2F1(1/2-n/2,1/2-n/2;3/2;1/4). - R. J. Mathar, Mar 19 2025

A027907 Triangle of trinomial coefficients T(n,k) (n >= 0, 0 <= k <= 2*n), read by rows: n-th row is obtained by expanding (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1, 1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1, 1, 7, 28, 77, 161, 266, 357, 393, 357, 266, 161, 77, 28, 7, 1, 1, 8, 36, 112, 266
Offset: 0

Views

Author

Keywords

Comments

When the rows are centered about their midpoints, each term is the sum of the three terms directly above it (assuming the undefined terms in the previous row are zeros). - N. J. A. Sloane, Dec 23 2021
T(n,k) = number of integer strings s(0),...,s(n) such that s(0)=0, s(n)=k, s(i) = s(i-1) + c, where c is 0, 1 or 2. Columns of T include A002426, A005717 and A014531.
Also number of ordered trees having n+1 leaves, all at level three and n+k+3 edges. Example: T(3,5)=3 because we have three ordered trees with 4 leaves, all at level three and 11 edges: the root r has three children; from one of these children two paths of length two are hanging (i.e., 3 possibilities) while from each of the other two children one path of length two is hanging. Diagonal sums are the tribonacci numbers; more precisely: Sum_{i=0..floor(2*n/3)} T(n-i,i) = A000073(n+2). - Emeric Deutsch, Jan 03 2004
T(n,k) = A111808(n,k) for 0 <= k <= n and T(n, 2*n-k) = A111808(n,k) for 0 <= k < n. - Reinhard Zumkeller, Aug 17 2005
The trinomial coefficients, T(n,i), are the absolute value of the coefficients of the chromatic polynomial of P_2 X P_n factored with x*(x-1)^i terms. Example: The chromatic polynomial of P_2 X P_2 is: x*(x-1) - 2*x*(x-1)^2 + x*(x-1)^3 and so T(1,0)=1, T(1,1)=2 and T(1,1) = 1. - Thomas J. Pfaff (tpfaff(AT)ithaca.edu), Oct 02 2006
T(n,k) is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 2 objects to fall into each urn. - N-E. Fahssi, Mar 16 2008
T(n,k) is the number of compositions of k into n parts p, each part 0 <= p <= 2. Adding 1 to each part, as a corollary, T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3. E.g., T(2,3)=2 since 5 = 3+2 = 2+3. - Steffen Eger, Jun 10 2011
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Number of lattice paths from (0,0) to (2*n-k,k) using steps (2,0), (1,1), (0,2). - Werner Schulte, Jan 25 2017
T(n,k) is number of distinct ways to sum the integers -1, 0 , and 1 n times to obtain n-k, where T(n,0) = T(n,2*n+1) = 1. - William Boyles, Apr 23 2017
T(n-1,k-1) is the number of 2-compositions of n with 0's having k parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
T(n,k) is the number of ways to obtain a sum of n+k when throwing a 3-sided die n times. Follows from the "T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3" comment above. - Feryal Alayont, Dec 30 2024

Examples

			The triangle T(n, k) begins:
  n\k 0   1   2   3   4   5   6   7   8   9 10 11 12
  0:  1
  1:  1   1   1
  2:  1   2   3   2   1
  3:  1   3   6   7   6   3   1
  4:  1   4  10  16  19  16  10   4   1
  5:  1   5  15  30  45  51  45  30  15   5  1
  6:  1   6  21  50  90 126 141 126  90  50 21  6  1
Concatenated rows:
G.f. = 1 + (x^2+x+1)*x + (x^2+x+1)^2*x^4 + (x^2+x+1)^3*x^9 + ...
     = 1 + (x + x^2 + x^3) + (x^4 + 2*x^5 + 3*x^6 + 2*x^7 + x^8) +
  (x^9 + 3*x^10 + 6*x^11 + 7*x^12 + 6*x^13 + 3*x^14 + x^15) + ... .
As a centered triangle, this begins:
           1
        1  1  1
     1  2  3  2  1
  1  3  6  7  6  3  1
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • D. C. Fielder and C. O. Alford, Pascal's triangle: top gun or just one of the gang?, in G E Bergum et al., eds., Applications of Fibonacci Numbers Vol. 4 1991 pp. 77-90 (Kluwer).
  • L. Kleinrock, Uniform permutation of sequences, JPL Space Programs Summary, Vol. 37-64-III, Apr 30, 1970, pp. 32-43.

Crossrefs

Columns of T include A002426, A005717, A014531, A005581, A005712, etc. See also A035000, A008287.
First differences are in A025177. Pairwise sums are in A025564.

Programs

  • Haskell
    a027907 n k = a027907_tabf !! n !! k
    a027907_row n = a027907_tabf !! n
    a027907_tabf = [1] : iterate f [1, 1, 1] where
       f row = zipWith3 (((+) .) . (+))
                        (row ++ [0, 0]) ([0] ++ row ++ [0]) ([0, 0] ++ row)
    a027907_list = concat a027907_tabf
    -- Reinhard Zumkeller, Jul 06 2014, Jan 22 2013, Apr 02 2011
  • Maple
    A027907 := proc(n,k) expand((1+x+x^2)^n) ; coeftayl(%,x=0,k) ; end proc:
    seq(seq(A027907(n,k),k=0..2*n),n=0..5) ; # R. J. Mathar, Jun 13 2011
    T := (n,k) -> simplify(GegenbauerC(`if`(kPeter Luschny, May 08 2016
  • Mathematica
    Table[CoefficientList[Series[(Sum[x^i, {i, 0, 2}])^n, {x, 0, 2 n}], x], {n, 0, 10}] // Grid (* Geoffrey Critzer, Mar 31 2010 *)
    Table[Sum[Binomial[n, i]Binomial[n - i, k - 2i], {i, 0, n}], {n, 0, 10}, {k, 0, 2n}] (* Adi Dani, May 07 2011 *)
    T[ n_, k_] := If[ n < 0, 0, Coefficient[ (1 + x + x^2)^n, x, k]]; (* Michael Somos, Nov 08 2016 *)
    Flatten[DeleteCases[#,0]&/@CellularAutomaton[{Total[#] &, {}, 1}, {{1}, 0}, 8] ] (* Giorgos Kalogeropoulos, Nov 09 2021 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    create_list(trinomial(n,k),n,0,8,k,0,2*n); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    create_list(ultraspherical(k,-n,-1/2),n,0,6,k,0,2*n); /* Emanuele Munarini, Oct 18 2016 */
    
  • PARI
    {T(n, k) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, k))}; /* Michael Somos, Jun 27 2003 */
    

Formula

G.f.: 1/(1-z*(1+w+w^2)).
T(n,k) = Sum_{r=0..floor(k/3)} (-1)^r*binomial(n, r)*binomial(k-3*r+n-1, n-1).
Recurrence: T(0,0) = 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k-0), with T(n,k) = 0 if k < 0 or k > 2*n:
T(i,0) = T(i, 2*i) = 1 for i >= 0, T(i, 1) = T(i, 2*i-1) = i for i >= 1 and for i >= 2 and 2 <= j <= i-2, T(i, j) = T(i-1, j-2) + T(i-1, j-1) + T(i-1, j).
The row sums are powers of 3 (A000244). - Gerald McGarvey, Aug 14 2004
T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2*i+n-k) * binomial(2*i+n-k, i). - Ralf Stephan, Jan 26 2005
T(n,k) = Sum_{j=0..n} binomial(n, j) * binomial(j, k-j). - Paul Barry, May 21 2005
T(n,k) = Sum_{j=0..n} binomial(k-j, j) * binomial(n, k-j). - Paul Barry, Nov 04 2005
From Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006: (Start)
T(n,k) = Sum_{j=0..n} (-1)^j * binomial(n,j) * binomial(2*n-2*j, k-j); (G. E. Andrews (1990)) obtained by expanding ((1+x)^2 - x)^n.
T(n,k) = Sum_{j=0..n} binomial(n,j) * binomial(n-j, k-2*j); obtained by expanding ((1+x) + x^2)^n.
T(n,k) = (-1)^k*Sum_{j=0..n} (-3)^j * binomial(n,j) * binomial(2*n-2*j, k-j); obtained by expanding ((1-x)^2 + 3*x)^n.
T(n,k) = (1/2)^k * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k-2*j); obtained by expanding ((1+x/2)^2 + (3/4)*x^2)^n.
T(n,k) = (2^k/4^n) * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k); obtained by expanding ((1/2+x)^2 + 3/4)^n using T(n,k) = T(2*n-k). (End)
From Paul D. Hanna, Apr 18 2012: (Start)
Let A(x) be the g.f. of the flattened sequence, then:
G.f.: A(x) = Sum_{n>=0} x^(n^2) * (1+x+x^2)^n.
G.f.: A(x) = Sum_{n>=0} x^n*(1+x+x^2)^n * Product_{k=1..n} (1 - (1+x+x^2) * x^(4*k-3)) / (1 - (1+x+x^2)*x^(4*k-1)).
G.f.: A(x) = 1/(1 - x*(1+x+x^2)/(1 + x*(1-x^2)*(1+x+x^2)/(1 - x^5*(1+x+x^2)/(1 + x^3*(1-x^4)*(1+x+x^2)/(1 - x^9*(1+x+x^2)/(1 + x^5*(1-x^6)*(1+x+x^2)/(1 - x^13* (1+x+x^2)/(1 + x^7*(1-x^8)*(1+x+x^2)/(1 - ...))))))))), a continued fraction.
(End)
Triangle: G.f. = Sum_{n>=0} (1+x+x^2)^n * x^(n^2) * y^n. - Daniel Forgues, Mar 16 2015
From Peter Luschny, May 08 2016: (Start)
T(n+1,n)/(n+1) = A001006(n) (Motzkin) for n>=0.
T(n,k) = H(n, k) if k < n else H(n, 2*n-k) where H(n,k) = binomial(n,k)*hypergeom([(1-k)/2, -k/2], [n-k+1], 4).
T(n,k) = GegenbauerC(m, -n, -1/2) where m=k if k < n else 2*n-k. (End)
T(n,k) = (-1)^k * C(2*n,k) * hypergeom([-k, -(2*n-k)], [-n+1/2], 3/4), for all k with 0 <= k <= 2n. - Robert S. Maier, Jun 13 2023
T(n,n) = Sum_{k=0..2*n} (-1)^k*(T(n,k))^2 and T(2*n,2*n) = Sum_{k=0..2*n} (T(n,k))^2 for n >= 0. - Werner Schulte, Nov 08 2016
T(n,n) = A002426(n), central trinomial coefficients. - M. F. Hasler, Nov 02 2019
Sum_{k=0..n-1} T(n, 2*k) = (3^n-1)/2. - Tony Foster III, Oct 06 2020

A027306 a(n) = 2^(n-1) + ((1 + (-1)^n)/4)*binomial(n, n/2).

Original entry on oeis.org

1, 1, 3, 4, 11, 16, 42, 64, 163, 256, 638, 1024, 2510, 4096, 9908, 16384, 39203, 65536, 155382, 262144, 616666, 1048576, 2449868, 4194304, 9740686, 16777216, 38754732, 67108864, 154276028, 268435456, 614429672, 1073741824, 2448023843
Offset: 0

Views

Author

Keywords

Comments

Inverse binomial transform of A027914. Hankel transform (see A001906 for definition) is {1, 2, 3, 4, ..., n, ...}. - Philippe Deléham, Jul 21 2005
Number of walks of length n on a line that starts at the origin and ends at or above 0. - Benjamin Phillabaum, Mar 05 2011
Number of binary integers (i.e., with a leading 1 bit) of length n+1 which have a majority of 1-bits. E.g., for n+1=4: (1011, 1101, 1110, 1111) a(3)=4. - Toby Gottfried, Dec 11 2011
Number of distinct symmetric staircase walks connecting opposite corners of a square grid of side n > 1. - Christian Barrientos, Nov 25 2018
From Gus Wiseman, Aug 20 2021: (Start)
Also the number of integer compositions of n + 1 with alternating sum > 0, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A345917. For example, the a(0) = 1 through a(4) = 11 compositions are:
(1) (2) (3) (4) (5)
(21) (31) (32)
(111) (112) (41)
(211) (113)
(122)
(212)
(221)
(311)
(1121)
(2111)
(11111)
The following relate to these compositions:
- The unordered version is A027193.
- The complement is counted by A058622.
- The reverse unordered version is A086543.
- The version for alternating sum >= 0 is A116406.
- The version for alternating sum < 0 is A294175.
- Ranked by A345917. (End)
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 07 2022

Examples

			From _Gus Wiseman_, Aug 20 2021: (Start)
The a(0) = 1 through a(4) = 11 binary numbers with a majority of 1-bits (Gottfried's comment) are:
  1   11   101   1011   10011
           110   1101   10101
           111   1110   10110
                 1111   10111
                        11001
                        11010
                        11011
                        11100
                        11101
                        11110
                        11111
The version allowing an initial zero is A058622.
(End)
		

References

  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.1.6)

Crossrefs

a(n) = Sum{(k+1)T(n, m-k)}, 0<=k<=[ (n+1)/2 ], T given by A008315.
Column k=2 of A226873. - Alois P. Heinz, Jun 21 2013
The even bisection is A000302.
The odd bisection appears to be A032443.

Programs

  • GAP
    List([0..35],n->Sum([0..Int(n/2)],k->Binomial(n,k))); # Muniru A Asiru, Nov 27 2018
  • Haskell
    a027306 n = a008949 n (n `div` 2)  -- Reinhard Zumkeller, Nov 14 2014
    
  • Magma
    [2^(n-1)+(1+(-1)^n)/4*Binomial(n, n div 2): n in [0..40]]; // Vincenzo Librandi, Jun 19 2016
    
  • Maple
    a:= proc(n) add(binomial(n, j), j=0..n/2) end:
    seq(a(n), n=0..32); # Zerinvary Lajos, Mar 29 2009
  • Mathematica
    Table[Sum[Binomial[n, k], {k, 0, Floor[n/2]}], {n, 1, 35}]
    (* Second program: *)
    a[0] = a[1] = 1; a[2] = 3; a[n_] := a[n] = (2(n-1)(2a[n-2] + a[n-1]) - 8(n-2) a[n-3])/n; Array[a, 33, 0] (* Jean-François Alcover, Sep 04 2016 *)
  • PARI
    a(n)=if(n<0,0,(2^n+if(n%2,0,binomial(n, n/2)))/2)
    

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n,k).
Odd terms are 2^(n-1). Also a(2n) - 2^(2n-1) is given by A001700. a(n) = 2^n + (n mod 2)*binomial(n, (n-1)/2).
E.g.f.: (exp(2x) + I_0(2x))/2.
O.g.f.: 2*x/(1-2*x)/(1+2*x-((1+2*x)*(1-2*x))^(1/2)). - Vladeta Jovovic, Apr 27 2003
a(n) = A008949(n, floor(n/2)); a(n) + a(n-1) = A248574(n), n > 0. - Reinhard Zumkeller, Nov 14 2014
From Peter Bala, Jul 21 2015: (Start)
a(n) = [x^n]( 2*x - 1/(1 - x) )^n.
O.g.f.: (1/2)*( 1/sqrt(1 - 4*x^2) + 1/(1 - 2*x) ).
Inverse binomial transform is (-1)^n*A246437(n).
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + ... is the o.g.f. for A001405. (End)
a(n) = Sum_{k=1..floor((n+1)/2)} binomial(n-1,(2n+1-(-1)^n)/4 -k). - Anthony Browne, Jun 18 2016
D-finite with recurrence: n*a(n) + 2*(-n+1)*a(n-1) + 4*(-n+1)*a(n-2) + 8*(n-2)*a(n-3) = 0. - R. J. Mathar, Aug 09 2017

Extensions

Better description from Robert G. Wilson v, Aug 30 2000 and from Yong Kong (ykong(AT)curagen.com), Dec 28 2000

A032443 a(n) = Sum_{i=0..n} binomial(2*n, i).

Original entry on oeis.org

1, 3, 11, 42, 163, 638, 2510, 9908, 39203, 155382, 616666, 2449868, 9740686, 38754732, 154276028, 614429672, 2448023843, 9756737702, 38897306018, 155111585372, 618679078298, 2468152192772, 9848142504068, 39301087452632, 156861290196878, 626155256640188
Offset: 0

Views

Author

J. H. Conway, Dec 11 1999

Keywords

Comments

Array interpretation: first row is filled with 1's, first column with powers of 2, b(i,j) = b(i-1,j) + b(i,j-1); then a(n) = b(n,n). - Benoit Cloitre, Apr 01 2002
1 1 1 1 1 1 1 ...
2 3 4 5 6 7 8 ...
4 7 11 16 22 ...
8 15 26 42 64 ...
16 31 .. 99 163 ...
From Gary W. Adamson, Dec 27 2008: (Start)
This is an analog of the Catalan sequence: Let M denote an infinite Cartan matrix (-1's in the super and subdiagonals and (2,2,2,...) in the main diagonal which we modify to (1,2,2,2,...)). Then A000108 can be generated by accessing the leftmost term in M^n * [1,0,0,0,...]. Change the operation to M^n * [1,2,3,...] to get this sequence. Or, take iterates M * [1,2,3,...] -> M * ANS, -> M * ANS,...; accessing the leftmost term. (End)
Convolved with the Catalan sequence, A000108: (1, 1, 2, 5, 14, ...) = powers of 4, A000302: (1, 4, 16, 64, ...). - Gary W. Adamson, May 15 2009
Row sums of A094527. - Paul Barry, Sep 07 2009
Hankel transform of the aeration of this sequence is C(n+2, 2). - Paul Barry, Sep 26 2009
Number of 4-ary words of length n in which the number of 1's does not exceed the number of 0's. - David Scambler, Aug 14 2012
Number of options available to a voter who has up to n (0-n) votes to allot among 2n candidates. - Lorraine Lee, Apr 27 2019
2*a(n-1) is the number of all triangulations that can be obtained from a Möbius strip with n chosen points on its edge. See Bazier-Matte et al. - Michel Marcus, Sep 15 2020

Examples

			G.f. = 1 + 3*x + 11*x^2 + 42*x^3 + 163*x^4 + 638*x^5 + 2510*x^6 + 9908*x^7 + ...
According to the second formula, we see the fourth row of Pascal's triangle has the terms 1,4,6,4,1 and the partial sums are 1,5,11,15,16. Using these we get 1*1 + 4*5 + 6*11 + 4*15*1*16 = 1 + 20 + 66 + 60 + 16 = 163 = a(4). - _J. M. Bergot_, Apr 29 2014
		

References

  • D. Phulara and L. W. Shapiro, Descendants in ordered trees with a marked vertex, Congressus Numerantium, 205 (2011), 121-128.

Crossrefs

Binomial transform of A027914. Hankel transform is {1, 2, 3, 4, ..., n, ...}.

Programs

Formula

a(n) = (4^n+binomial(2*n, n))/2. - David W. Wilson
a(n) = Sum_{0 <= i_1 <= i_2 <= n} binomial(n, i_2) * binomial(n, i_1+i_2). - Benoit Cloitre, Oct 14 2004
Sequence with interpolated zeros has a(n) = Sum_{k=0..floor(n/2)} (if((n-2k) mod 2)=0, C(n, k), 0). - Paul Barry, Jan 14 2005
a(n) = Sum_{k=0..n} C(n+k-1, k)*2^(n-k). - Paul Barry, Sep 28 2007
E.g.f.: exp(2*x)*(exp(2*x) + BesselI(0,2*x))/2. For BesselI see Abramowitz-Stegun (reference and link under A008277), p. 375, eq. 9.6.10. See also A000984 for its e.g.f. - Wolfdieter Lang, Jan 16 2012
From Sergei N. Gladkovskii, Aug 13 2012: (Start)
G.f.: (1/sqrt(1-4*x) + 1/(1-4*x))/2 = G(0)/2 where G(k) = 1 + ((2*k)!)/(k!)^2/(4^k - 4*x*(16^k)/( 4*x*(4^k) + ((2*k)!)/(k!)^2/G(k+1))); (continued fraction).
E.g.f.: G(0)/2 where G(k) = 1 + ((2*k)!)/(k!)^2/(4^k - 4*x*(16^k)/( 4*x*(4^k) + (k+1)*((2*k)!)/(k!)^2/G(k+1))); (continued fraction).
(End)
O.g.f.: (1 - x*(2 + c(x)))/(1 - 4*x)^(3/2), with c the o.g.f. of A000108 (Catalan). - Wolfdieter Lang, Nov 22 2012
D-finite with recurrence: n*a(n) + 2*(-4*n+3)*a(n-1) + 8*(2*n-3)*a(n-2) = 0. - R. J. Mathar, Dec 04 2012
a(n) = binomial(2*n-1,n) + floor(4^n/2), or a(n+1) = A001700(n) + A004171(n), for all n >= 0. See A000346 for the difference. - M. F. Hasler, Jan 02 2014
0 = a(n) * (256*a(n+1) - 224*a(n+2) + 40*a(n+3)) + a(n+1) * (-32*a(n+1) + 56*a(n+2) - 14*a(n+3)) + a(n+2) * (-2*a(n+2) + a(n+3)) if n > -4. - Michael Somos, Jan 25 2014
a(n) = coefficient of x^n in (4*x + 1 / (1 + x))^n. - Michael Somos, Jan 25 2014
Binomial transform is A110166. - Michael Somos, Jan 25 2014
Asymptotics: a(n) ~ 2^(2*n-1)*(1+1/sqrt(Pi*n)). - Fung Lam, Apr 13 2014
Self-convolution is A240879. - Fung Lam, Apr 13 2014
a(0) = 1, a(n+1) = A001700(n) + 2^(2n+1). - Philippe Deléham, Oct 11 2014
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + 3*x + 10*x^2 + 35*x^3 + 126*x^4 + ... is the o.g.f. for A001700. - Peter Bala, Jul 21 2015
a(n) = 4*a(n-1) - A000108(n-1). - Bob Selcoe, Apr 02 2017
a(n) = [x^n] 1/((1 - x)^n*(1 - 2*x)). - Ilya Gutkovskiy, Oct 12 2017
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 08 2022
O.g.f.: ( hypergeom([1/4, 3/4], [1/2], 4*x) )^2. - Peter Bala, Mar 04 2022
a(n) = binomial(2*n, n) * hypergeom([1, -n], [n + 1], -1). - Peter Luschny, Oct 06 2023

A111808 Left half of trinomial triangle (A027907), triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 7, 1, 4, 10, 16, 19, 1, 5, 15, 30, 45, 51, 1, 6, 21, 50, 90, 126, 141, 1, 7, 28, 77, 161, 266, 357, 393, 1, 8, 36, 112, 266, 504, 784, 1016, 1107, 1, 9, 45, 156, 414, 882, 1554, 2304, 2907, 3139, 1, 10, 55, 210, 615, 1452, 2850, 4740, 6765, 8350
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 17 2005

Keywords

Comments

Consider a doubly infinite chessboard with squares labeled (n,k), ranks or rows n in Z, files or columns k in Z (Z denotes ...,-2,-1,0,1,2,... ); number of king-paths of length n from (0,0) to (n,k), 0 <= k <= n, is T(n,n-k). - Harrie Grondijs, May 27 2005. Cf. A026300, A114929, A114972.
Triangle of numbers C^(2)(n-1,k), n>=1, of combinations with repetitions from elements {1,2,...,n} over k, such that every element i, i=1,...,n, appears in a k-combination either 0 or 1 or 2 times (cf. also A213742-A213745). - Vladimir Shevelev and Peter J. C. Moses, Jun 19 2012

References

  • Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.

Crossrefs

Row sums give A027914; central terms give A027908;
T(n, 0) = 0;
T(n, 1) = n for n>1;
T(n, 2) = A000217(n) for n>1;
T(n, 3) = A005581(n) for n>2;
T(n, 4) = A005712(n) for n>3;
T(n, 5) = A000574(n) for n>4;
T(n, 6) = A005714(n) for n>5;
T(n, 7) = A005715(n) for n>6;
T(n, 8) = A005716(n) for n>7;
T(n, 9) = A064054(n-5) for n>8;
T(n, n-5) = A098470(n) for n>4;
T(n, n-4) = A014533(n-3) for n>3;
T(n, n-3) = A014532(n-2) for n>2;
T(n, n-2) = A014531(n-1) for n>1;
T(n, n-1) = A005717(n) for n>0;
T(n, n) = central terms of A027907 = A002426(n).

Programs

  • Maple
    T := (n,k) -> simplify(GegenbauerC(k, -n, -1/2)):
    for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, May 09 2016
  • Mathematica
    Table[GegenbauerC[k, -n, -1/2], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Feb 28 2017 *)

Formula

(1 + x + x^2)^n = Sum(T(n,k)*x^k: 0<=k<=n) + Sum(T(n,k)*x^(2*n-k): 0<=k
T(n, k) = A027907(n, k) = Sum_{i=0,..,(k/2)} binomial(n, n-k+2*i) * binomial(n-k+2*i, i), 0<=k<=n.
T(n, k) = GegenbauerC(k, -n, -1/2). - Peter Luschny, May 09 2016

Extensions

Corrected and edited by Johannes W. Meijer, Oct 05 2010

A246437 Expansion of (1/2)*(1/(x+1)+1/(sqrt(-3*x^2-2*x+1))).

Original entry on oeis.org

1, 0, 2, 3, 10, 25, 71, 196, 554, 1569, 4477, 12826, 36895, 106470, 308114, 893803, 2598314, 7567465, 22076405, 64498426, 188689685, 552675364, 1620567764, 4756614061, 13974168191, 41088418150, 120906613076, 356035078101, 1049120176954
Offset: 0

Author

Vladimir Kruchinin, Nov 14 2014

Keywords

Comments

a(2101) has 1001 decimal digits. - Michael De Vlieger, Apr 25 2016
This is the analog for Coxeter type B of Motzkin sums (A005043) for Coxeter type A, see the article by Athanasiadis and Savvidou. - F. Chapoton, Jul 20 2017
Number of compositions of n into exactly n nonnegative parts avoiding part 1. a(4) = 10: 0004, 0022, 0040, 0202, 0220, 0400, 2002, 2020, 2200, 4000. - Alois P. Heinz, Aug 19 2018
From Peter Bala, Jan 07 2022: (Start)
The binary transform is A088218. The inverse binomial transform is a signed version of A027306 and the second inverse binomial transform is a signed version of A027914.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and all positive integers n and k.
Conjecture: the stronger supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for primes p >= 5 and positive integers n and k. (End)

Programs

  • Mathematica
    CoefficientList[Series[(1/2) (1 / (x + 1) + 1 / (Sqrt[-3 x^2 - 2 x + 1])), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 14 2014 *)
    Table[(-1)^n (Hypergeometric2F1[1/2, -n, 1, 4] + 1)/2, {n, 0, 20}] (* Vladimir Reshetnikov, Apr 25 2016 *)
    Table[Sum[Binomial[n, k] Binomial[n - k - 1, n - 2 k], {k, 0, n/2}], {n, 0, 28}] (* Michael De Vlieger, Apr 25 2016 *)
  • Maxima
    a(n):=sum(binomial(n,k)*binomial(n-k-1,n-2*k),k,0,n/2);
    
  • Sage
    def a(n):
        if n < 3: return [1,0,2][n]
        return n*hypergeometric([1-n, 1-n/2, 3/2-n/2],[2, 2-n], 4)
    [simplify(a(n)) for n in (0..28)] # Peter Luschny, Nov 14 2014

Formula

a(n) = Sum_{k = 0..n/2} binomial(n,k)*binomial(n-k-1,n-2*k).
A(x) = 1 + x*B'(x)/B(x), where B(x) = (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x)) is the o.g.f. of A005043.
a(n) = n*hypergeom([1-n, 1-n/2, 3/2-n/2],[2, 2-n], 4) for n>=3. - Peter Luschny, Nov 14 2014
a(n) ~ 3^(n+1/2) / (4*sqrt(Pi*n)). - Vaclav Kotesovec, Nov 14 2014
a(n) = (-1)^n*(hypergeom([1/2, -n], [1], 4) + 1)/2. - Vladimir Reshetnikov, Apr 25 2016
D-finite with recurrence: n*(a(n) - a(n-1)) = (5*n-6)*a(n-2) + 3*(n-2)*a(n-3). - Vladimir Reshetnikov, Oct 13 2016
a(n) = [x^n]( (1 - x + x^2)/(1 - x) )^n. - Peter Bala, Jan 07 2022

A094531 Array read by rows: right-hand side of triangle A027907 of trinomial coefficients.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 7, 6, 3, 1, 19, 16, 10, 4, 1, 51, 45, 30, 15, 5, 1, 141, 126, 90, 50, 21, 6, 1, 393, 357, 266, 161, 77, 28, 7, 1, 1107, 1016, 784, 504, 266, 112, 36, 8, 1, 3139, 2907, 2304, 1554, 882, 414, 156, 45, 9, 1, 8953, 8350, 6765, 4740, 2850, 1452, 615, 210, 55
Offset: 0

Author

Paul Barry, May 07 2004

Keywords

Comments

Sometimes called a Motzkin triangle, although that name is usually reserved for A026300.
Expand (1+x+x^2)^n and take last (nonzero) coefficient of first row, last two coefficients of second row, etc.
Equals A094531*(1,xc(-x^2)) where c(x) is the g.f. of A000108. - Paul Barry, May 12 2009
Coefficients of Faber polynomials for (1/x+1+x): Fa(n,x) = Sum_{k=0..n} T(n,k)*x^k, g.f.: -log((sqrt(-3*t^2-2*t+1)-t+1)/2-t*x) = Sum_{n>0} Fa(n,x)*t^n/n. - Vladimir Kruchinin, Jul 01 2013

Examples

			Triangle begins:
    1;
    1,   1;
    3,   2,   1;
    7,   6,   3,   1;
   19,  16,  10,   4,   1;
   51,  45,  30,  15,   5,   1;
  141, 126,  90,  50,  21,   6,   1;
  393, 357, 266, 161,  77,  28,   7,   1;
  ...
		

Crossrefs

Binomial transform is triangle A094527. Row sums are A027914.
Cf. A111808 (row reversed).

Programs

  • Maple
    T := (n, k) -> simplify(GegenbauerC(n-k, -n, -1/2)):
    for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, May 12 2016
  • Mathematica
    max = 10; se = Series[ -Log[ (Sqrt[-3*t^2 - 2*t + 1] - t + 1)/2 - t*x], {t, 0, max + 1}, {x, 0, max}]; a[n_, k_] := SeriesCoefficient[se, {t, 0, n}, {x, 0, k}]*n; a[0, 0] = 1; Table[a[n, k], {n, 0, max }, {k, 0, n}] // Flatten  (* Jean-François Alcover, Jul 02 2013, after Vladimir Kruchinin *)
    Table[Binomial[n, k] Hypergeometric2F1[(k - n)/2, (k - n + 1)/2, k + 1, 4], {n, 0, 9}, {k, 0, n}] // Flatten (* or *)
    Table[If[n == 0, 1, GegenbauerC[n - k, -n, -1/2]], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, May 12 2016 *)

Formula

Riordan array ( 1/sqrt(1-2*x-3*x^2), (1-x-sqrt(1-2*x-3*x^2))/(2*x) ). - N. J. A. Sloane, Jun 02 2005
Product of Riordan arrays (1/(1-x), x/(1-x)) (Pascal's triangle, A007318) and (1/sqrt(1-4x^2), (1-sqrt(1-4*x^2))/(2*x)) (A108044). Inverse is A102587. - Paul Barry, Jul 14 2005
Column k has e.g.f. exp(x)*Bessel_I(k, 2x). - Paul Barry, Jul 14 2005
T(n, k) = Sum_{i=0..n} C(n-k-i, i)*C(n, k+i). - Paul Barry, Nov 04 2005
T(n, k) = Sum_{j=0..n} C(n,j)*C(j,n-k-j). - Paul Barry, Oct 25 2006
From Paul Barry, May 12 2009: (Start)
Production matrix is
1, 1;
2, 1, 1;
0, 1, 1, 1;
0, 0, 1, 1, 1;
0, 0, 0, 1, 1, 1; (End)
From Peter Bala, Jun 29 2015: (Start)
Riordan array has the form ( x*h'(x)/h(x), h(x) ) with h(x) = (1 - x -sqrt(1 - 2*x - 3*x^2))/(2*x) and so belongs to the hitting time subgroup H of the Riordan group (see Peart and Woan, Example 1.1).
T(n,k) = [x^(n-k)] f(x)^n with f(x) = 1 + x + x^2. In general the (n,k)th entry of the hitting time array ( x*h'(x)/h(x), h(x) ) has the form [x^(n-k)] f(x)^n, where f(x) = x/( series reversion of h(x) ). (End)
From Peter Luschny, May 12 2016: (Start)
T(n,k) = binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+1], 4):
T(n,k) = GegenbauerC(n-k, -n, -1/2). (End)

A055216 Triangle T(n,k) by rows, n >= 0, 0<=k<=n: T(n,k) = Sum_{i=0..n-k} binomial(n-k,i) *Sum_{j=0..k-i} binomial(i,j).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 3, 1, 1, 5, 10, 8, 3, 1, 1, 6, 15, 17, 9, 3, 1, 1, 7, 21, 31, 23, 9, 3, 1, 1, 8, 28, 51, 50, 26, 9, 3, 1, 1, 9, 36, 78, 96, 66, 27, 9, 3, 1, 1, 10, 45, 113, 168, 147, 76, 27, 9, 3, 1, 1, 11, 55, 157, 274, 294, 192, 80, 27, 9, 3, 1
Offset: 0

Author

Clark Kimberling, May 07 2000

Keywords

Comments

T(n,k) is the maximal number of different sequences that can be obtained from a ternary sequence of length n by deleting k symbols.
T(i,j) is the number of paths from (0,0) to (i-j,j) using steps (1 unit right) or (1 unit right and 1 unit up) or (1 unit right and 2 units up).
If m >= 1 and n >= 2, then T(m+n-1,m) is the number of strings (s(1),s(2),...,s(n)) of nonnegative integers satisfying s(n)=m and 0<=s(k)-s(k-1)<=2 for k=2,3,...,n.
T(n,k) is the number of 1100-avoiding 0-1 sequences of length n containing k good 1's. A 1 is bad if it is immediately followed by two or more 1's and then a 0; otherwise it is good. In particular, a 1 with no 0's to its right is good. For example, 110101110111 is 1100-avoiding and only the 1 in position 6 is bad and T(4,3) counts 0111, 1011, 1101. - David Callan, Jul 25 2005
The matrix inverse starts:
1;
-1,1;
1,-2,1;
-1,3,-3,1;
1,-4,6,-4,1;
-2,8,-13,11,-5,1;
8,-30,45,-36,18,-6,1;
-36,137,-207,163,-78,27,-7,1;
192,-732,1112,-884,425,-144,38,-8,1;
- R. J. Mathar, Mar 12 2013

Examples

			8=T(5,2) counts these strings: 013, 023, 113, 123, 133, 223, 233, 333.
Rows:
1;
1,1;
1,2,1;
1,3,3,1;
1,4,6,3,1;
...
		

Crossrefs

Row sums: A008937. Central numbers: T(2n, n)=A027914(n) for n >= 0.

Programs

  • Maple
    A055216 := proc(n,k)
        a := 0 ;
        for i from 0 to n-k do
            a := a+binomial(n-k,i)*add(binomial(i,j),j=0..k-i) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 13 2013
  • Mathematica
    T[n_, k_] := Sum[Binomial[n - k, i]*Sum[Binomial[i, j], {j, 0, k - i}], {i, 0, n - k}];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 28 2019 *)

Formula

T(i, 0)=T(i, i)=1 for i >= 0; T(i, 1)=T(i, i-1)=i for i >= 2; T(i, j)=T(i-1, j)+T(i-2, j-1)+T(i-3, j-2) for 2<=j<=i-2, i >= 3.

Extensions

Better description and references from N. J. A. Sloane, Aug 05 2000

A055217 a(n) = sum of the first n coefficients of (1+x+x^2)^n.

Original entry on oeis.org

1, 3, 10, 31, 96, 294, 897, 2727, 8272, 25048, 75747, 228826, 690691, 2083371, 6280650, 18925047, 57002616, 171633840, 516632307, 1554702516, 4677501237, 14069962041, 42314975352, 127240600050, 382555886571, 1150026301089
Offset: 0

Author

Clark Kimberling, May 07 2000

Keywords

Crossrefs

T(2n+1, n), array T as in A055216.

Programs

  • Haskell
    a055217 n = sum $ take (n + 1) $ a027907_row (n + 1)
    -- Reinhard Zumkeller, Jan 22 2013
    
  • Maple
    a := n -> simplify((3^(n+1) - GegenbauerC(n+1,-n-1,-1/2))/2):
    seq(a(n), n=0..25); # Peter Luschny, May 12 2016
  • Mathematica
    Total/@Table[Take[CoefficientList[Expand[(1+x+x^2)^n],x],n],{n,30}] (* Harvey P. Dale, Aug 14 2011 *)
  • Maxima
    a(n):=sum(sum(binomial(n,j)*binomial(j,2*j-n-k),j,ceiling((n+k)/2),n),k,1,n); /* Vladimir Kruchinin, Aug 11 2010 */
    
  • PARI
    a(n) = my(v=Vec((1+'x+'x^2)^n)); sum(k=1, n, v[k]);

Formula

From Paul Barry, Jan 20 2008: (Start)
Binomial transform of A117186.
G.f.: (1+x-sqrt(1-2x-3x^2))/(2x*(1-2x-3x^2)).
a(n) = (3^(n+1) + A002426(n+1))/2. (End)
From Vladimir Kruchinin, Aug 11 2010: (Start)
Logarithm g.f.: log(1/(1-x*M(x))) = Sum_{n>0} a(n-1)/n*x^n, M(x) - o.g.f Motzkin numbers (A001006).
a(n) = sum(sum(binomial(n,j)*binomial(j,2*j-n-k),j,ceiling((n+k)/2),n),k,1,n), n>0. (End)
Conjecture: (n+1)*a(n) -(5*n+1)*a(n-1) +3*(n-1)*a(n-2) +9*(n-1)*a(n-3)=0. - R. J. Mathar, Nov 14 2011
a(n) = 3^n * 3/2 + O(3^n/sqrt(n)). - Charles R Greathouse IV, Dec 02 2015
From Peter Luschny, May 12 2016: (Start)
a(n) = (3^(n+1) - hypergeom([-(n+1)/2, -n/2], [1], 4))/2.
a(n) = (3^(n+1) - GegenbauerC(n+1,-n-1,-1/2))/2. (End)

Extensions

New description from Paul D. Hanna, Oct 09 2003

A081673 Expansion of exp(3*x) - exp(x)*(1-BesselI_0(2*x)).

Original entry on oeis.org

1, 3, 11, 33, 99, 293, 869, 2579, 7667, 22821, 68001, 202799, 605229, 1807263, 5399195, 16136513, 48243347, 144275093, 431573297, 1291258319, 3864163769, 11565703931, 34622195135, 103656406949, 310377872861, 929465445743
Offset: 0

Author

Paul Barry, Mar 28 2003

Keywords

Comments

Binomial transform of A081672.

Crossrefs

Programs

  • Maple
    Egf:= exp(3*x)-exp(x)*(1-BesselI(0,2*x)):
    S:= series(Egf,x,101):
    seq(coeff(S,x,n)*n!, n=0..100); # Robert Israel, Jun 03 2016
  • Mathematica
    CoefficientList[Series[E^(3*x)-E^x*(1-BesselI[0,2*x]), {x, 0, 50}], x] * Range[0, 50]! (* Vaclav Kotesovec, Jul 02 2015 *)

Formula

E.g.f. exp(3*x) - exp(x)*(1-BesselI_0(2*x)).
Conjecture: n*(2*n - 7)*a(n) +(-12*n^2 + 50*n - 33)*a(n-1) +(16*n^2 - 76*n + 87)*a(n-2) +3*(4*n^2 - 22*n + 27)*a(n-3) -9*(2*n-5)*(n-3)*a(n-4)=0. - R. J. Mathar, Nov 24 2012
a(n) ~ 3^n * (1 + sqrt(3)/(2*sqrt(Pi*n))). - Vaclav Kotesovec, Jul 02 2015
From Robert Israel, Jun 03 2016: (Start)
E.g.f. A(x) satisfies
-27 A + (-63 x + 9) A' + (-18 x^2 + 42 x + 39) A'' + (12 x^2 + 68 x - 25) A''' + (16 x^2 - 58 x + 4) A'''' + (-12 x^2 + 11 x) A''''' + 2 x^2 A'''''' = 0.
This implies Mathar's conjectured recursion. (End)
Showing 1-10 of 16 results. Next