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.

A356692 Pascal-like triangle, where each entry is the sum of the four entries above it starting with 1 at the top.

This page as a plain text file.
%I A356692 #28 Sep 03 2022 22:08:23
%S A356692 1,1,1,2,2,2,4,6,6,4,10,16,20,16,10,26,46,62,62,46,26,72,134,196,216,
%T A356692 196,134,72,206,402,618,742,742,618,402,206,608,1226,1968,2504,2720,
%U A356692 2504,1968,1226,608,1834,3802,6306,8418,9696,9696,8418,6306,3802,1834,5636,11942,20360,28222,34116,36228,34116,28222,20360,11942,5636
%N A356692 Pascal-like triangle, where each entry is the sum of the four entries above it starting with 1 at the top.
%C A356692 Similar in spirit to the regular Pascal triangle, except that here we have T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) + T(n-1,k+1), with the understanding that T(0,0) is defined to be 1, and T(n,k) is defined as 0 for k<0 and k>n.
%C A356692 T(n,k) is the number of permutations p of [n+1] such that at most one element of {p(1),...,p(i-1)} is between p(i) and p(i+1) for all i <= n and p(n+1) = k+1. T(4,1) = 16: 13542, 14532, 15342, 15432, 31542, 35142, 35412, 41532, 45132, 45312, 51342, 51432, 53142, 53412, 54132, 54312. - _Alois P. Heinz_, Aug 31 2022
%H A356692 Alois P. Heinz, <a href="/A356692/b356692.txt">Rows n = 0..150, flattened</a>
%F A356692 T(n,k) = T(n,n-k).
%e A356692 T(4,0) = 10 because it is the sum of T(3,-2), T(3,-1), T(3,0), and T(3,1) which gives 0+0+4+6 = 10.
%e A356692 Triangle begins:
%e A356692              1
%e A356692            1   1
%e A356692          2   2   2
%e A356692        4   6   6   4
%e A356692      10  16  20  16  10
%e A356692    26  46  62  62  46  26
%e A356692   ...
%p A356692 T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
%p A356692       `if`(n=0, 1, add(T(n-1,j), j=k-2..k+1)))
%p A356692     end:
%p A356692 seq(seq(T(n, k), k=0..n), n=0..10);  # _Alois P. Heinz_, Aug 28 2022
%t A356692 T[0, 0] = 1; T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0,
%t A356692     T[n - 1, k - 2] + T[n - 1, k - 1] + T[n - 1, k] + T[n - 1, k + 1]];
%t A356692 Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten
%Y A356692 Row sums give A216837(n+1).
%Y A356692 Column k=0 and also main diagonal give A356832.
%Y A356692 T(2n,n) gives A356853.
%Y A356692 Cf. A007318, A064189.
%K A356692 nonn,tabl
%O A356692 0,4
%A A356692 _Greg Dresden_ and _Sadek Mohammed_, Aug 23 2022