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.

A355564 Triangle read by rows: T(n,k) = n*(1+2*k) - k*(1+k), n >= 1, 0 <= k <= n-1.

Original entry on oeis.org

1, 2, 4, 3, 7, 9, 4, 10, 14, 16, 5, 13, 19, 23, 25, 6, 16, 24, 30, 34, 36, 7, 19, 29, 37, 43, 47, 49, 8, 22, 34, 44, 52, 58, 62, 64, 9, 25, 39, 51, 61, 69, 75, 79, 81, 10, 28, 44, 58, 70, 80, 88, 94, 98, 100, 11, 31, 49, 65, 79, 91, 101, 109, 115, 119, 121
Offset: 1

Views

Author

Lucas B. Vieira, Jul 07 2022

Keywords

Comments

T(n,k) is the number of potentially nonzero elements in a square, n X n band matrix of bandwidth k, i.e., the number of matrix elements (i,j) for which |i-j| <= k.
T(n,0) = n, as a zero-bandwidth matrix is diagonal, and T(n,n-1) = n^2, as the band encompasses the entire matrix.

Examples

			Triangle starts:
  1;
  2,  4;
  3,  7,  9;
  4, 10, 14, 16;
  5, 13, 19, 23, 25;
  6, 16, 24, 30, 34, 36;
  7, 19, 29, 37, 43, 47, 49;
  ...
Example: For n = 6 and k = 2, we have a band matrix of the form
    [. . . 0 0 0]
    [. . . . 0 0]
    [. . . . . 0]
    [0 . . . . .],
    [0 0 . . . .]
    [0 0 0 . . .]
where dots represent the entries which may have nonzero values. The number of such entries is T(6,2) = 24.
		

Crossrefs

The sequence is complementary to A095832, i.e.: T(n,k) = n^2 - A095832(n,k).
Differences within a row T(n,k+1) - T(n,k) give A212012.

Programs

  • Mathematica
    Flatten[Table[n (1 + 2 k) - k (1 + k), {n, 1, 10}, {k, 0, n - 1}]]