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.

A261356 Pyramid of coefficients in expansion of (1+x+2*y)^n.

This page as a plain text file.
%I A261356 #48 Sep 16 2023 12:02:18
%S A261356 1,1,1,2,1,2,4,1,4,4,1,3,6,3,12,12,1,6,12,8,1,4,8,6,24,24,4,24,48,32,
%T A261356 1,8,24,32,16,1,5,10,10,40,40,10,60,120,80,5,40,120,160,80,1,10,40,80,
%U A261356 80,32,1,6,12,15,60,60,20,120,240,160,15,120,360,480
%N A261356 Pyramid of coefficients in expansion of (1+x+2*y)^n.
%C A261356 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 two kinds of steps (1,1,1).
%C A261356 The sum of the terms in each slice of the pyramid is 4^n (A000302).
%C A261356 The terms of the j-th row of the n-th slice of this pyramid are the sum of the terms in each row of the j-th triangle of the n-th slice of A189225. - _Dimitri Boscainos_, Aug 21 2015
%H A261356 Alois P. Heinz, <a href="/A261356/b261356.txt">Rows n = 0..38, flattened</a>
%F A261356 T(i+1,j,k) = 2*T(i,j-1,k-1)+T(i,j-1,k)+T(i,j,k); T(i,j,-1)=0,...; T(0,0,0)=1.
%F A261356 T(n,j,k) = 2^k*binomial(n,j)*binomial(j,k). - _Dimitri Boscainos_, Aug 21 2015
%e A261356 Here is the fourth (n=3) slice of the pyramid:
%e A261356 .....1......
%e A261356 ...3   6....
%e A261356 ..3  12  12.
%e A261356 .1  6  12  8
%e A261356 As an irregular triangle, rows begin:
%e A261356 1;
%e A261356 1, 1, 2;
%e A261356 1, 2, 4, 1, 4, 4;
%e A261356 1, 3, 6, 3, 12, 12, 1, 6, 12, 8;
%e A261356 ...
%p A261356 p:= proc(i, j, k) option remember;
%p A261356       if k<0 or i<0 or i>k or j<0 or j>i then 0
%p A261356     elif {i, j, k}={0} then 1
%p A261356     else p(i, j, k-1) +p(i-1, j, k-1) +2*p(i-1, j-1, k-1)
%p A261356       fi
%p A261356     end:
%p A261356 seq(seq(seq(p(i, j, k), j=0..i), i=0..k), k=0..5);
%p A261356 # _Alois P. Heinz_, Aug 20 2015
%t A261356 p[i_, j_, k_] := p[i, j, k] = If[k < 0 || i < 0 || i > k || j < 0 || j > i, 0, If[Union@{i, j, k} == {0}, 1, p[i, j, k - 1] + p[i - 1, j, k - 1] + 2* p[i - 1, j - 1, k - 1]]];
%t A261356 Table[Table[Table[p[i, j, k], {j, 0, i}], {i, 0, k}], {k, 0, 5}] // Flatten (* _Jean-François Alcover_, Sep 16 2023, after _Alois P. Heinz_ *)
%Y A261356 Cf. A046816, A261357.
%K A261356 nonn,tabf
%O A261356 0,4
%A A261356 _Dimitri Boscainos_, Aug 16 2015