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.

A136481 Triangle: h(n,m)=If[m == 1, n, If[n - m + 1 == 0, 1, If[n - m == 0, 1, If[n - m > 0, 1, 0]]]],n,m<=d.

Original entry on oeis.org

1, 1, -1, -1, -2, 1, 1, 0, 3, -1, -1, 0, 2, -4, 1, 1, 0, 0, -5, 5, -1, -1, 0, 0, -2, 9, -6, 1, 1, 0, 0, 0, 7, -14, 7, -1, -1, 0, 0, 0, 2, -16, 20, -8, 1, 1, 0, 0, 0, 0, -9, 30, -27, 9, -1, -1, 0, 0, 0, 0, -2, 25, -50, 35, -10, 1
Offset: 1

Views

Author

Roger L. Bagula, Mar 20 2008

Keywords

Examples

			{1},
{1, -1},
{-1, -2, 1},
{1, 0, 3, -1},
{-1, 0, 2, -4, 1},
{1, 0, 0, -5, 5, -1},
{-1, 0, 0, -2, 9, -6, 1},
{1, 0, 0, 0, 7, -14, 7, -1},
{-1,0, 0, 0, 2, -16, 20, -8, 1},
{1, 0, 0, 0, 0, -9, 30, -27,9, -1},
{-1, 0, 0, 0, 0, -2, 25, -50, 35, -10, 1}
		

Programs

  • Mathematica
    f[n_, m_] := If[m == 1, n,If[n - m + 1 == 0, 1, If[n - m == 0, 1, If[n - m > 0, 1, 0]]]];
    M[d_] := Table[Table[f[n, m], {n, 1, d}], {m, 1, d}];
    a = Join[{{1}}, Table[CoefficientList[CharacteristicPolynomial[M[n], x], x], {n, 1, 10}]];
    Flatten[a]