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.

A145661 Triangle T(n,k) = (-1)^k * A119258(n,k) read by rows, 0 <= k <= n.

Original entry on oeis.org

1, 1, -1, 1, -3, 1, 1, -5, 7, -1, 1, -7, 17, -15, 1, 1, -9, 31, -49, 31, -1, 1, -11, 49, -111, 129, -63, 1, 1, -13, 71, -209, 351, -321, 127, -1, 1, -15, 97, -351, 769, -1023, 769, -255, 1, 1, -17, 127, -545, 1471, -2561, 2815, -1793, 511, -1, 1, -19, 161, -799, 2561
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Mar 16 2009

Keywords

Comments

Row sums are (-1)^(n+1)*(n-1) for n >= 1.
A145661, A119258 and A118801 are all essentially the same (see the Shattuck and Waldhauser paper). - Tamas Waldhauser, Jul 25 2011

Examples

			Triangle begins
  1;
  1,  -1;
  1,  -3,   1;
  1,  -5,   7,   -1;
  1,  -7,  17,  -15,    1;
  1,  -9,  31,  -49,   31,    -1;
  1, -11,  49, -111,  129,   -63,    1;
  1, -13,  71, -209,  351,  -321,  127,    -1;
  1, -15,  97, -351,  769, -1023,  769,  -255,    1;
  1, -17, 127, -545, 1471, -2561, 2815, -1793,  511,    -1;
  1, -19, 161, -799, 2561, -5503, 7937, -7423, 4097, -1023, 1;
		

Crossrefs

A193844 is an essentially identical triangle.

Programs

  • Maple
    A119258 := proc(n,k)
            if k=0 or k = n then
                    1;
            elif k<0 or k> n then
                    0;
            else
                    2*procname(n-1,k-1)+procname(n-1,k) ;
            end if;
    end proc:
    seq(seq(A119258(n,k),k=0..n),n=0..10) ;
    A145661 := proc(n,k)
            (-1)^k*A119258(n,k) ;
    end proc: # R. J. Mathar, Oct 21 2011
  • Mathematica
    Clear[M, T, d, a, x, a0];
    T[n_, m_, d_] := If[ m == n + 1, 1, If[n == d, 1, 0]];
    M[d_] := MatrixPower[Table[T[n, m, d], {n, 1, d}, {m, 1, d}], d];
    Table[M[d], {d, 1, 10}];
    Table[Det[M[d]], {d, 1, 10}];
    Table[CharacteristicPolynomial[M[d], x], {d, 1, 10}];
    a = Join[{{1}}, Table[CoefficientList[Expand[CharacteristicPolynomial[M[n], x]], x], {n, 1, 10}]];
    Flatten[a]
    Join[{1}, Table[Apply[ Plus, CoefficientList[Expand[CharacteristicPolynomial[M[n], x]], x]], {n, 1, 10}]];