|
|
A008287
|
|
Triangle of quadrinomial coefficients, row n is the sequence of coefficients of (1 + x + x^2 + x^3)^n.
|
|
38
|
|
|
1, 1, 1, 1, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1, 1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
Coefficient of x^k in (1 + x + x^2 + x^3)^n is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 3 objects to fall in 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<=3. 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<=4. E.g., T(2,3)=4 since 3=0+3=3+0=1+2=2+1. In general, the entry (n,k) of the (l+1)-nomial triangle gives the number of compositions of k into n parts p, each part 0<=p<=l. - Steffen Eger, Jun 18 2011
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2), (1,3). - Joerg Arndt, Jul 05 2011
T(n-1,k-1) is the number of 3-compositions of n with zeros having k parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
|
|
REFERENCES
|
B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8. English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see p. 17.
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).
|
|
LINKS
|
Jack Ramsay, On Arithmetical Triangles, The Pulse of Long Island, June 1965 [Mentions application to design of antenna arrays. Annotated scan.]
|
|
FORMULA
|
n-th row is formed by expanding (1+x+x^2+x^3)^n.
T(n,0) = 1; T(n,3*n) = 1; T(n,k) = T(n,3*n-k);
T(n,k) = 0, iff k<0 or k>3*n; Sum{k=0..3*n} T(n,k) = 4^n; Sum{k=0..3*n}((-1)^k)*T(n,k)=0 for n > 0; [corrected by Werner Schulte, Sep 09 2015]
T(n,k) = Sum{i=0..floor(k/2)} C(n,i)*C(n,k-2*i);
T(n+1,k) = T(n,k-3)+T(n,k-2)+T(n,k-1)+T(n,k). (End)
T(n,k) = Sum_{i = 0..floor(k/4)} (-1)^i*C(n,i)*C(n+k-1-4*i,n-1) for n >= 0 and 0 <= k <= 3*n. - Peter Bala, Sep 07 2013
T(n,k) = Sum_{j=0..k} (-2)^j*binomial(n,j)*binomial(3*n-2*j,k-j) for n >= 0 and 0 <= k <= 3*n (conjectured). - Werner Schulte, Sep 09 2015
|
|
EXAMPLE
|
Triangle begins
1;
1,1,1,1;
1,2,3,4,3,2,1;
1,3,6,10,12,12,10,6,3,1; ...
|
|
MAPLE
|
#Define the r-nomial coefficients for r = 1, 2, 3, ...
rnomial := (r, n, k) -> add((-1)^i*binomial(n, i)*binomial(n+k-1-r*i, n-1), i = 0..floor(k/r)):
#Display the 4-nomials as a table
r := 4: rows := 10:
for n from 0 to rows do
seq(rnomial(r, n, k), k = 0..(r-1)*n)
end do;
# second Maple program:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))((1+x+x^2+x^3)^n):
|
|
MATHEMATICA
|
Flatten[Table[CoefficientList[(1 + x + x^2 + x^3)^n, x], {n, 0, 10}]] (* T. D. Noe, Apr 04 2011 *)
T[n_, k_] := Sum[Binomial[n, i] Binomial[n, k-2i], {i, 0, k/2}]; Table[T[n, k], {n, 0, 6}, {k, 0, 3n}] // Flatten (* Jean-François Alcover, Feb 02 2018 *)
|
|
PROG
|
(Maxima) quadrinomial(n, k):=coeff(expand((1+x+x^2+x^3)^n), x, k);
create_list(quadrinomial(n, k), n, 0, 8, k, 0, 3*n); /* Emanuele Munarini, Mar 15 2011 */
(Haskell)
a008287 n = a008287_list !! n
a008287_list = concat $ iterate ([1, 1, 1, 1] *) [1]
instance Num a => Num [a] where
fromInteger k = [fromInteger k]
(p:ps) + (q:qs) = p + q : ps + qs
ps + qs = ps ++ qs
(p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
_ * _ = []
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|