login
Generalized Pascal triangle read by rows: T(n,0) = T(0,n) = 1 for n >= 0, T(n,k) = 0 for k < 0 or k > n; otherwise T(n,k) = T(n-2,k-2) + T(n-2,k-1) + T(n-2,k) for 1 <= k <= n-1.
12

%I #51 Aug 24 2021 09:02:00

%S 1,1,1,1,1,1,1,2,2,1,1,2,3,2,1,1,3,5,5,3,1,1,3,6,7,6,3,1,1,4,9,13,13,

%T 9,4,1,1,4,10,16,19,16,10,4,1,1,5,14,26,35,35,26,14,5,1,1,5,15,30,45,

%U 51,45,30,15,5,1,1,6,20,45,75,96,96,75,45,20,6,1

%N Generalized Pascal triangle read by rows: T(n,0) = T(0,n) = 1 for n >= 0, T(n,k) = 0 for k < 0 or k > n; otherwise T(n,k) = T(n-2,k-2) + T(n-2,k-1) + T(n-2,k) for 1 <= k <= n-1.

%C The borders are all 1's, with zero entries outside. To get an internal entry, use the rule that D = A+B+C here:

%C A B C

%C * * * *

%C * * D * *

%C That is, add the three terms directly above you, two rows back.

%C This is the triangle er(n,k) defined in the Ehrenborg and Readdy link. See Proposition 2.4 and Table 1. - _Michel Marcus_, Sep 14 2016

%C If the offset is changed from 0 to 1, this is also the table U(n,k) of the coefficients [x^k] p_n(x) of the polynomials p_n(x) = (x + 1)*p_{n-1}(x) (if n even), p_n = (x^2 + x + 1)^floor(n/2) if n odd.

%C May be split into two triangles by taking the even-numbered and odd-numbered rows separately: the even-numbered rows give A027907.

%C From _Peter Bala_, Aug 19 2021: (Start)

%C Let M denote the lower unit triangular array A070909. For k = 0,1,2,..., define M(k) to be the lower unit triangular block array

%C /I_k 0\

%C \ 0 M/

%C having the k x k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section below. The proof uses the hockey-stick identities from the Formula section. (End)

%H Rémy Sigrist, <a href="/A169623/b169623.txt">Rows 0..199, flattened</a>

%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Barry/barry321.html">Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices</a>, Journal of Integer Sequences, 19, 2016, #16.3.5.

%H Richard Ehrenborg and Margaret A. Readdy, <a href="http://arxiv.org/abs/1609.03216">The Gaussian coefficient revisited</a>, arXiv:1609.03216 [math.CO], 2016.

%H Richard L. Ollerton and Anthony G. Shannon, <a href="http://www.fq.math.ca/Scanned/36-2/ollerton.pdf">Some properties of generalized Pascal squares and triangles</a>, Fib. Q., 36 (No. 2, 1998), 98-109. See Table 10.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Hockey-stick_identity">Hockey-stick identity</a>.

%F From _Peter Bala_, Aug 19 2021: (Start)

%F T(2*n,k) = T(2*n-1,k-1) + T(2*n-2,k).

%F T(2*n,k) = T(2*n-1,k) + T(2*n-2,k-2).

%F T(2*n+1,k) = T(2*n,k) + T(2*n,k-1).

%F Hockey stick identities (relate row k entries to entries in row k-1):

%F T(2*n,k) = T(2*n-1,k-1) + T(2*n-3,k-1) + T(2*n-5,k-1) + ....

%F T(2*n+1,k) = T(2*n,k-1) + ( T(2*n-1,k-1) + T(2*n-3,k-1) + T(2*n-5,k-1) + ... ). (End)

%e Triangle begins:

%e 1

%e 1 1

%e 1 1 1

%e 1 2 2 1

%e 1 2 3 2 1

%e 1 3 5 5 3 1

%e 1 3 6 7 6 3 1

%e 1 4 9 13 13 9 4 1

%e 1 4 10 16 19 16 10 4 1

%e ...

%e As a square array read by antidiagonals:

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, ...

%e 1, 2, 3, 5, 6, 9, 10, 14, 15, 20, 21, 27, ...

%e 1, 2, 5, 7, 13, 16, 26, 30, 45, ...

%e 1, 3, 6, 13, 19, 35, 45, 75, ...

%e 1, 3, 9, 16, 35, 51, 96, ...

%e ...

%e From _Peter Bala_, Aug 19 2021: (Start)

%e With the arrays M(k) as defined in the Comments section, the infinite product M(0)*M(1)*M(2)*... begins

%e /1 \/1 \/1 \ /1 \ /1 \

%e |1 1 ||0 1 ||0 1 ||0 1 | |1 1 |

%e |1 0 1 ||0 1 1 ||0 0 1 ||0 0 1 |... = |1 1 1 |

%e |1 0 1 1 ||0 1 0 1 ||0 0 1 1 ||0 0 0 1 | |1 2 2 1 |

%e |1 0 1 0 1||0 1 0 1 1||0 0 1 0 1||0 0 0 1 1| |1 2 3 2 1 |

%e |... ||... |... ||... | |... |

%e (End)

%p T:=proc(n,k) option remember;

%p if n >= 0 and k = 0 then 1

%p elif n >= 0 and k = n then 1

%p elif (k < 0 or k > n) then 0

%p else T(n-2,k-2)+T(n-2,k-1)+T(n-2,k);

%p fi;

%p end;

%p for n from 0 to 14 do lprint([seq(T(n,k),k=0..n)]); od: # _N. J. A. Sloane_, Nov 23 2017

%t p[x, 1] := 1;

%t p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + x + 1)^Floor[n/2]]

%t a = Table[CoefficientList[p[x, n], x], {n, 1, 12}]

%t Flatten[a] /* This is for the same sequence but with offset 1 */

%Y A123149 is essentially the same triangle, except for a diagonal of zeros.

%Y Row sums are in A182522 (essentially A038754).

%Y Cf. A027907, A070909.

%Y See A295555 for the next triangle in the series A007318, A169623 (this sequence).

%K nonn,easy,tabl

%O 0,8

%A _Roger L. Bagula_ and _Gary W. Adamson_, Dec 03 2009

%E Keyword:tabl added, notation standardized, formula added by the Assoc. Editors of the OEIS, Feb 02 2010

%E Entry revised by _N. J. A. Sloane_, Nov 23 2017