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.

A132898 Triangle read by rows: T(n,k) = (-1)^(n-1)*n + (-1)^(k-1)*k - 1, 1 <= k <= n.

Original entry on oeis.org

1, -2, -5, 3, 0, 5, -4, -7, -2, -9, 5, 2, 7, 0, 9, -6, -9, -4, -11, -2, -13, 7, 4, 9, 2, 11, 0, 13, -8, -11, -6, -13, -4, -15, -2, -17, 9, 6, 11, 4, 13, 2, 15, 0, 17, -10, -13, -8, -15, -6, -17, -4, -19, -2, -21, 11, 8, 13, 6, 15, 4, 17, 2, 19, 0, 21
Offset: 1

Views

Author

Gary W. Adamson, Sep 03 2007

Keywords

Comments

Row sums = A132899: (1, -7, 8, -22, 23, -45, ...).

Examples

			First few rows of the triangle:
   1;
  -2,  -5;
   3,   0,   5;
  -4,  -7,  -2,  -9;
   5,   2,   7,   0,   9;
  -6,  -9,  -4, -11,  -2, -13;
   7,   4,   9,   2,  11,   0,  13;
  -8, -11,  -6, -13,  -4, -15,  -2, -17;
   9,   6,  11,   4,  13,   2,  15,   0,   7;
  ...
T(5,3) = 7 = S(5) + S(3) = 5 + 3 - 1.
		

Crossrefs

Row sums are A132899.
Cf. A127648.

Programs

  • PARI
    T(n,k) = if(k<=n, (-1)^(n-1)*n + (-1)^(k-1)*k - 1, 0); \\ Andrew Howroyd, Sep 01 2018

Extensions

Name clarified and terms a(56) and beyond from Andrew Howroyd, Sep 01 2018