login
This site is supported by donations to The OEIS Foundation.

 

Logo

Many excellent designs for a new banner were submitted. We will use the best of them in rotation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046816 Entries in 3-dimensional version of Pascal triangle: trinomial coefficients. 17
1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 3, 3, 3, 6, 3, 1, 3, 3, 1, 1, 4, 4, 6, 12, 6, 4, 12, 12, 4, 1, 4, 6, 4, 1, 1, 5, 5, 10, 20, 10, 10, 30, 30, 10, 5, 20, 30, 20, 5, 1, 5, 10, 10, 5, 1, 1, 6, 6, 15, 30, 15, 20, 60, 60, 20, 15, 60, 90, 60, 15, 6, 30, 60, 60, 30, 6, 1, 6, 15, 20, 15, 6, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

Greatest numbers in each 2D triangle form A022916 (multinomial coefficient n!/([n/3]![(n+1)/3]![(n+2)/3]!).) 2D triangle sums are powers of 3. - Gerald McGarvey, Aug 15 2004

REFERENCES

Marco Costantini: Metodo per elevare qualsiasi trinomio a qualsiasi potenza. Archimede, rivista per gli insegnanti e i cultori di matematiche pure e applicate, anno XXXVIII ottobre-dicembre 1986, pp. 205-209 [From Vincenzo Librandi, Jul 19 2009]

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10659

FORMULA

Coefficients of x, y, z in (x+y+z)^n: a(i+1, k, j) = a(i, k, j)+a(i, j, k-1)+a(i, j-1, k-1), a(i, j, -1) := 0, ...; a(0, 0, 0)=1.

EXAMPLE

... 1 .... Here is the third slice of the pyramid

.. 3 3

. 3 6 3

.1 3 3 1

MAPLE

p:= proc(i, j, k) option remember;

      if k<0 or i<0 or i>k or j<0 or j>i then 0

    elif {i, j, k}={0} then 1

    else p(i, j, k-1) +p(i-1, j, k-1) +p(i-1, j-1, k-1)

      fi

    end:

seq (seq (seq (p(i, j, k), j=0..i), i=0..k), k=0..10);

#  Alois P. Heinz, Apr 03 2011

MATHEMATICA

p[i_, j_, k_] := p[i, j, k] = Which[ k<0 || i<0 || i>k || j<0 || j>i, 0, {i, j, k} == {0, 0, 0}, 1, True, p[i, j, k-1] + p[i-1, j, k-1] + p[i-1, j-1, k-1]]; Table[p[i, j, k], {k, 0, 6}, {i, 0, k}, {j, 0, i}] // Flatten (* Jean-Fran├žois Alcover, Dec 31 2012, translated from Alois P. Heinz's Maple program *)

PROG

(Haskell)

a046816 n = a046816_list !! n

a046816_list = concat $ concat $ iterate ([[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

   _ * _               = []

-- Reinhard Zumkeller, Apr 02 2011

CROSSREFS

Cf. A007318.

Entry [3, 2] in each slice gives A002378, entry [4, 3] in each slice gives A027480, entry [5, 2] in each slice gives A033488, entry [5, 3] in each slice gives A033487.

Sequence in context: A089955 A180312 A178819 * A138328 A137264 A193238

Adjacent sequences:  A046813 A046814 A046815 * A046817 A046818 A046819

KEYWORD

nonn,tabf,easy

AUTHOR

Lior Manor

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified April 16 00:25 EDT 2014. Contains 240534 sequences.