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.

A134636 Triangle formed by Pascal's rule given borders = 2n+1.

Original entry on oeis.org

1, 3, 3, 5, 6, 5, 7, 11, 11, 7, 9, 18, 22, 18, 9, 11, 27, 40, 40, 27, 11, 13, 38, 67, 80, 67, 38, 13, 15, 51, 105, 147, 147, 105, 51, 15, 17, 66, 156, 252, 294, 252, 156, 66, 17, 19, 83, 222, 408, 546, 546, 408, 222, 83, 19, 21, 102, 305, 630, 954, 1092, 954, 630, 305, 102, 21
Offset: 0

Views

Author

Gary W. Adamson, Nov 04 2007

Keywords

Comments

Row sums = A048487: (1, 6, 16, 36, 76, 156, ...).

Examples

			First few rows of the triangle:
   1;
   3,  3;
   5,  6,  5;
   7, 11, 11,  7;
   9, 18, 22, 18,  9;
  11, 27, 40, 40, 27, 11;
  13, 38, 67, 80, 67, 38, 13;
  ...
		

Crossrefs

Programs

  • Haskell
    a134636 n k = a134636_tabl !! n !! k
    a134636_row n = a134636_tabl !! n
    a134636_tabl = iterate (\row -> zipWith (+) ([2] ++ row) (row ++ [2])) [1]
    -- Reinhard Zumkeller, Nov 23 2012
  • Maple
    T:= proc(n,k) option remember;
          `if`(k<0 or k>n, 0,
          `if`(k=0 or k=n, 2*n+1,
             T(n-1, k-1) + T(n-1, k) ))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, May 26 2013
  • Mathematica
    NestList[Append[Prepend[Map[Apply[Plus, #] &, Partition[#, 2, 1]], #[[1]] + 2], #[[1]] + 2] &, {1}, 10] // Grid  (* Geoffrey Critzer, May 26 2013 *)
    T[n_, k_] := Binomial[n, k-1] + Binomial[n, k] + 2 Binomial[n, k+1] + Binomial[n, n-k+1];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Formula

Triangle, given borders = (1, 3, 5, 7, 9, ...); apply Pascal's rule T(n,k) = T(n-1,k) P T(n-1,k-1).
T(n,k) = A051601(n,k) + A051597(n,k); T(n,k) mod 2 = A047999(n,k). - Reinhard Zumkeller, Nov 23 2012
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013

Extensions

Offset changed by Reinhard Zumkeller, Nov 23 2012