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.

A051632 Rows of triangle formed using Pascal's rule except we begin and end the n-th row with n-2.

Original entry on oeis.org

-2, -1, -1, 0, -2, 0, 1, -2, -2, 1, 2, -1, -4, -1, 2, 3, 1, -5, -5, 1, 3, 4, 4, -4, -10, -4, 4, 4, 5, 8, 0, -14, -14, 0, 8, 5, 6, 13, 8, -14, -28, -14, 8, 13, 6, 7, 19, 21, -6, -42, -42, -6, 21, 19, 7, 8, 26, 40, 15, -48, -84, -48, 15, 40, 26, 8, 9, 34, 66, 55, -33, -132, -132
Offset: 0

Views

Author

Keywords

Comments

Row sums are -2.

Examples

			Contribution from Roger L. Bagula, Feb 17 2009: (Start)
The rows of the triangle, negated, are:
{2},
{1, 1},
{0, 2, 0},
{-1, 2, 2, -1},
{-2, 1, 4, 1, -2},
{-3, -1, 5,5, -1, -3},
{-4, -4, 4, 10, 4, -4, -4},
{-5, -8, 0, 14, 14, 0, -8, -5},
{-6, -13, -8, 14, 28, 14, -8, -13, -6},
{-7, -19, -21, 6, 42,42, 6, -21, -19, -7},
{-8, -26, -40, -15, 48, 84, 48, -15, -40, -26, -8} (End)
		

Crossrefs

A156644 [From Roger L. Bagula, Feb 17 2009]
Cf. A007318.

Programs

  • Haskell
    a051632 n k = a051632_tabl !! n !! k
    a051632_list = concat a051632_tabl
    a051632_tabl = iterate (\rs -> zipWith (+) ([1] ++ rs) (rs ++ [1])) [-2]
    -- Reinhard Zumkeller, Aug 21 2011
  • Mathematica
    t[n_, k_] = ((2*k + 1 - n)/(k + 1))*Binomial[n, k] + ((1 - n + 2 (-k + n))/(1 - k + n)) Binomial[n, -k + n];
    Table[Table[t[n, k], {k, 0, n}], {n, 0, 10}];
    Flatten[%] (* Roger L. Bagula , Feb 17 2009 *)

Formula

-t(n,k)=((2*k + 1 - n)/(k + 1))*Binomial[n, k] + ((1 - n + 2 (-k + n))/(1 - k + n)) Binomial[n, -k + n]. [From Roger L. Bagula, Feb 17 2009]