OFFSET
1,2
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.
EXAMPLE
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.
MATHEMATICA
Flatten[Table[n (1 + 2 k) - k (1 + k), {n, 1, 10}, {k, 0, n - 1}]]
CROSSREFS
KEYWORD
AUTHOR
Lucas B. Vieira, Jul 07 2022
STATUS
approved