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.
%I A046816 #126 Dec 26 2024 11:39:45 %S A046816 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, %T A046816 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, %U A046816 30,15,20,60,60,20,15,60,90,60,15,6,30,60,60,30,6,1,6,15,20,15,6,1 %N A046816 Pascal's tetrahedron: entries in 3-dimensional version of Pascal triangle, or trinomial coefficients. %C A046816 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 %C A046816 T(n,j,k) is the number of lattice paths from (0,0,0) to (n,j,k) with steps (1,0,0), (1,1,0) and (1,1,1). - _Dimitri Boscainos_, Aug 16 2015 %C A046816 T(n,j,k) is the number of k-dimensional hyperfaces in an n-dimensional hypercube at an edge distance of j from a given vertex. For example, the number of 2D faces in a 3D cube touching a given vertex is T(3,0,2) = 3, and the number of 3D cube 1D edges at a separation of 1 edge from a given vertex is T(3,1,1) = 6. - _Eitan Y. Levine_, Jul 22 2023 %C A046816 The sums along vertical lines within each slice (when oriented as in the example) give A027907. See "vertical sums" link. - _Eitan Y. Levine_, May 17 2023 %C A046816 Numbers of ways to classify n circles black, red, or green; classified first by how many circles there are altogether, then by how many are of each color. - _J. Lowell_, Nov 06 2024 %D A046816 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. [_Vincenzo Librandi_, Jul 19 2009] %H A046816 Alois P. Heinz, <a href="/A046816/b046816.txt">Table of n, a(n) for n = 0..10659</a> %H A046816 Eitan Y. Levine, <a href="/A046816/a046816_1.txt">Vertical sums</a> %H A046816 Wikipedia, <a href="https://en.wikipedia.org/wiki/Pascal%27s_pyramid">Pascal's pyramid</a> %H A046816 <a href="/index/3#3DArrays">Index entries for sequences related to 3D arrays of numbers</a> %F A046816 Coefficients of x, y, z in (x+y+z)^n: Let T'(n; i,j,k) := T(n, j,k) where i = n-(j+k). Then T'(n+1; i,j,k) = T'(n; i-1,j,k)+T'(n; i,j-1,k)+T'(n; i,j,k-1), T'(n; i,j,-1) := 0, T'(n; i,j,k) is invariant under permutations of (i,j,k); T'(0, 0, 0)=1. %F A046816 T'(n; i,j,k) = n!/(i!*j!*k!) and (x+y+z)^n = Sum_{i+j+k=n; 0 <= i,j,k <= n} T'(n; i,j,k)*x^i*y^j*z^k. Hence Sum_{i+j+k=n; 0 <= i,j,k <= n} T'(n; i,j,k) = 3^n. - _Gregory Gerard Wojnar_, Oct 08 2020 %F A046816 G.f.: 1/(1-x-x*y-x*y*z). - _Georg Fischer_, May 29 2019 %F A046816 T(n,j,k) = C(n,j) * C(n-j,k), where C(a,b) are the binomial coefficients, elements of A007318. In particular, T(n,j,0) = C(n,j). - _Eitan Y. Levine_, Jul 22 2023 %F A046816 (-1)^n * Sum_{i=ceiling(n/k)..n} (-1)^i * T(i*k,n-i,i) = k^n, for n,k > 0. - _Eitan Y. Levine_, Aug 31 2023 %e A046816 The first few slices of the tetrahedron (or pyramid) are: %e A046816 1 %e A046816 ----------------- %e A046816 1 %e A046816 1 1 %e A046816 ----------------- %e A046816 1 %e A046816 2 2 %e A046816 1 2 1 %e A046816 ----------------- %e A046816 1 .... Here is the third slice of the pyramid %e A046816 3 3 %e A046816 3 6 3 %e A046816 1 3 3 1 %e A046816 ---------------- %e A046816 ... %p A046816 p:= proc(i, j, k) option remember; %p A046816 if k<0 or i<0 or i>k or j<0 or j>i then 0 %p A046816 elif {i, j, k}={0} then 1 %p A046816 else p(i, j, k-1) +p(i-1, j, k-1) +p(i-1, j-1, k-1) %p A046816 fi %p A046816 end: %p A046816 seq(seq(seq(p(i, j, k), j=0..i), i=0..k), k=0..10); %p A046816 # _Alois P. Heinz_, Apr 03 2011 %t A046816 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 *) %t A046816 (* or *) %t A046816 Flatten[CoefficientList[CoefficientList[CoefficientList[Series[1/(1-x-x*y-x*y*z), {x, 0, 6}], x], y],z]] (* _Georg Fischer_, May 29 2019 *) %o A046816 (Haskell) %o A046816 a046816 n = a046816_list !! n %o A046816 a046816_list = concat $ concat $ iterate ([[1],[1,1]] *) [1] %o A046816 instance Num a => Num [a] where %o A046816 fromInteger k = [fromInteger k] %o A046816 (p:ps) + (q:qs) = p + q : ps + qs %o A046816 ps + qs = ps ++ qs %o A046816 (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs %o A046816 _ * _ = [] %o A046816 -- _Reinhard Zumkeller_, Apr 02 2011 %o A046816 (Python) %o A046816 from math import comb as C %o A046816 def T(n, j, k): return C(n, j) * C(n-j, k) %o A046816 print([T(n, r-c, c) for n in range(7) for r in range(n+1) for c in range(r+1)]) # _Michael S. Branicky_, Dec 26 2024 %Y A046816 Cf. A007318, A022916. %Y A046816 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. %Y A046816 See A268240 for this read mod 2. %Y A046816 Cf. A013609 (row sums). %K A046816 nonn,tabf,look,easy %O A046816 0,6 %A A046816 _Lior Manor_