OFFSET
0,2
COMMENTS
Companion triangle A124572 is generated by switching the main diagonal with the superdiagonal. The row sum of row n is 4^n.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..5000
EXAMPLE
Row 3 = [27, 13, 21, 3] since when n = 3 we have M^3 = [[27, 13, 21, 3], [0, 1, 39, 15], [0, 0, 27, 13], [0, 0, 0, 1]].
First few rows of the triangle are:
1;
3, 1;
9, 4, 3;
27, 13, 21, 3;
81, 40, 102, 24, 9;
243, 121, 426, 126, 99, 9;
...
MAPLE
with (LinearAlgebra): for n from 0 to 10 do M := Matrix (n+1, (i, j)->`if`(i=j and i mod 2 = 1, 3, `if`(i=j, 1, `if`(i=j-1 and i mod 2 = 1, 1, `if`(i=j-1, 3, 0))))): X := M^n: for m from 0 to n do printf("%d, ", X[1, m+1]): od: od: # Nathaniel Johnston, Apr 28 2011
CROSSREFS
KEYWORD
AUTHOR
Gary W. Adamson & Roger L. Bagula, Nov 04 2006
STATUS
approved