Trinomial Coefficient

DOWNLOAD Mathematica Notebook

A trinomial coefficient is a coefficient of the trinomial triangle. Following the notation of Andrews (1990), the trinomial coefficient (n; k)_2, with n>=0 and -n<=k<=n, is given by the coefficient of x^(n+k) in the expansion of (1+x+x^2)^n. Therefore,

 (n; -k)_2=(n; k)_2.
(1)

The trinomial coefficient can be given by the closed form

 (n; k)_2={1   for n=k=0; C_(k+n)^((-n))(-1/2)   otherwise,
(2)

where C_n^((lambda))(z) is a Gegenbauer polynomial.

Equivalently, the trinomial coefficients are defined by

 (1+x+x^(-1))^n=sum_(k=-n)^n(n; k)_2x^k.
(3)

The trinomial coefficients also have generating function

f(w,z)=1/(1-z(1+w+w^2))
(4)
=1+z(1+w+w^2)+z^2(1+2w+3w^2+2w^3+w^4)+...,
(5)

i.e.,

 sum_(n=0)^inftysum_(k=-n)^n(n; -k)_2z^nw^(k+n)=1/(1-z(1+w+w^2)).
(6)

The trinomial triangle gives the triangle of trinomial coefficients,

 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
(7)

(OEIS A027907).

The central column of the trinomial triangle gives the central trinomial coefficients.

The trinomial coefficient is also given by the number of permutations of n symbols, each -1, 0, or 1, which sum to k. For example, there are seven permutations of three symbols which sum to 0, {-1,0,1}, {-1,1,0}, {0,-1,1}, {0,0,0}, and {0,1,-1}, {1,-1,0}, {1,0,-1}, so (3; 0)_2=7.

An alternative (but different) definition of the trinomial coefficients is as the coefficients in (x+y+z)^n (Andrews 1990), which is therefore a multinomial coefficient with k=3, giving

 (n_1,n_2,n_3)!=((n_1+n_2+n_3)!)/(n_1!n_2!n_3!).
(8)

Trinomial coefficients have a rather sparse literature, although no less than Euler (in 1765) authored a 20-page paper on their properties (Andrews 1990).

The following table gives the first few columns of the trinomial triangle.

kOEIS(n,k)-trinomial coefficients
0A0024261, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, ...
1A0057171, 2, 6, 16, 45, 126, 357, 1016, 2907, 8350, ...
2A0145311, 3, 10, 30, 90, 266, 784, 2304, ...
3A0145321, 4, 15, 50, 161, 504, 1554, 4740, ...
4A0145331, 5, 21, 77, 266, 882, 2850, 9042, ...
5A0984701, 6, 28, 112, 414, 1452, 4917, ...

The diagonals (n; n-k)_2 are summarized in the following table.

k(n; n-k)_2OEIS
01
1nA000027
21/2n(n+1)A000217
31/6(n-1)n(n+4)A005581
41/(24)(n-1)n(n^2+7n-6)A005712
51/(120)(n-2)(n-1)n(n+1)(n+12)A000574
61/(720)(n-2)(n-1)n(n^3+18n^2+17n-120)A005714
71/(5040)(n-3)(n-2)(n-1)n(n^3+27n^2+116n-120)A005715
81/(40320)(n-3)(n-2)(n-1)n(n+1)(n+10)(n^2+23n-84)A005716

The trinomial coefficients satisfy an identity similar to that of the binomial coefficients, namely

 (n; k)_2=(n-1; k-1)_2+(n-1; k)_2+(n-1; k+1)_2
(9)

(Andrews 1990).

Explicit formulas for (n; k)_2 are given by

(n; k)_2=sum_(j=0)^(n)(n!)/(j!(j+k)!(n-2j-k)!)
(10)
(n; k)_2=sum_(j=0)^(n)(-1)^j(n; j)(2n-2j; n-k-j)
(11)

(Andrews 1990), which gives the closed forms

(n; k)_2=(n!)/((n-k)!)_2F^~_1(1/2(k-n),1/2(k-n+1);k+1;4)
(12)
=((2n)!)/((n-k)!(n+k)!)_2F^~_1(-k-n,k-n;1/2-n;1/4),
(13)

where _2F^~_1(a,b;c;z) is a regularized hypergeometric function.

For at least n<2000 and k<=n, (n; k)_2 is prime iff n=k+1 is prime (since in that case (n; k)_2=n) or (n,k)=(2,0), (3, 0), or (4, 0). It is apparently not known if this property holds for all n. However, the k=1 column is explicitly given by

 (n; 1)_2=nM_(n-1),
(14)

where M_k is a Motzkin number, and so can only be prime for n=2.

In 1765, Euler noted the pretty near-identity of central trinomial coefficients

 3(n+1; 0)_2-(n+2; 0)_2=F_n(F_n+1),
(15)

where F_n is a Fibonacci number, which holds only for n<=7 (Andrews 1990). For n=0, 1, ..., the first few values of the left side are (OEIS A103872), while the values on the right side are 0, 2, 2, 6, 12, 30, 72, 182, ... (OEIS A059727). A couple of pages of Euler's works containing the near-identity was sent by D. Knuth to R. K. Guy, who included it in his article on the strong law of small numbers (Guy 1990). Meanwhile, Guy had met G. Andrews at the Bateman retirement conference and showed it to him. Half an hour later, Andrews came back with the q-series identity from which Euler's near result follows. In particular, defining

 E_n(a,b)=sum_(k=-infty)^infty[(n; 10k+a)_2-(n; 10k+b)_2]
(16)

gives the identities

E_n(1,2)=1/2F_n(F_n+1)
(17)
E_(n-1)(0,3)=1/2F_n(F_n+1)
(18)
E_(n+1)(0,1)=1/2F_n(F_n+1)
(19)
E_n(1,4)=F_(n+1)F_n
(20)
E_(n+1)(2,3)=F_(n+1)F_n
(21)
E_n(3,4)=1/2F_n(F_n-1)
(22)
E_(n-1)(2,5)=1/2F_n(F_n-1)
(23)
E_(n+1)(4,5)=1/2F_n(F_n-1)
(24)
E_n(1,3)=1/2(F_(2n)+F_n)
(25)
E_n(2,4)=1/2(F_(2n)-F_n)
(26)
E_n(1,5)=1/2(F_(2n+1)-F_(n-1))
(27)
E_n(0,4)=1/2(F_(2n+1)+F_(n-1))
(28)
E_n(0,2)=1/2(F_(2n-1)+F_(n+1))
(29)
E_n(3,5)=1/2(F_(2n-1)-F_(n+1))
(30)
E_n(0,5)=F_(2n-1)+F_nF_(n-1)
(31)

(Andrews 1990). This then leads to the near-identity via

3(n+1; 0)_2-(n+2; 0)_2=2(n+1; 0)_2-2(n+1; 1)_2
(32)
=2E_(n+1)(0,1) for n<=7
(33)
=F_n(F_n+1) for n<=7.
(34)

Andrews (1990) also gave the pretty identities

 sum_(k=-infty)^infty(n; 10k+a)_2={1/2F_n^2+1/2F_(n-1)^2+1/2F_(n-1)F_n+2/5F_(n-1)+1/5F_n+1/(10)3^n   for a=0; 1/2F_(n-1)F_nF_n+1/2F_n^2-1/(10)F_(n-1)+1/5F_n+1/(10)3^n   for a=1; 1/2F_(n-1)F_n-1/(10)F_(n-1)-3/(10)F_n+1/(10)3^n   for a=2; -1/2F_(n-1)F_n-1/(10)F_(n-1)-3/(10)F_n+1/(10)3^n   for a=3; -1/2F_(n-1)F_n-1/2F_n^2-1/(10)F_(n-1)+1/5F_n+1/(10)3^n   for a=4; -1/2F_(n-1)^2-1/2F_(n-1)F_n-1/2F_n^2+2/5F_(n-1)+1/5F_n+1/(10)3^n   for a=5.
(35)

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.