OFFSET
1,2
COMMENTS
The 3 rows: 1 3 2, 2 1 3 and 3 2 1 form a semi-magic square; with rows, columns and a diagonal having a sum of 6. a(n)/a(n-1) tends to 6, an eigenvalue of the matrix. E.g.: a(7)/a(6) = 93339/15534 = 6.0086... A094944 uses the same format and operations but has different terms.
FORMULA
G.f.: (1+10*x+18*x^2)/(1-3*x-18*x^3-15*x^2); a(n+3)=3*a(n+2)+15*a(n+1)+18*a(n), a(0) = 1, a(1) = 13, a(2) = 72. - Alec Mihailovs, Aug 28 2005
Let [1 3 2 / 2 1 3 / 3 2 1] = the 3 X 3 matrix M. Take M^n * [1 0 0] = [p q r]; then a(n) = p.
EXAMPLE
a(4) = 429 since M^4 * [1 0 0] = [429 q r]
MATHEMATICA
a[n_] := (MatrixPower[{{1, 3, 2}, {2, 1, 3}, {3, 2, 1}}, n].{{1}, {0}, {0}})[[1, 1]]; Table[ a[n], {n, 10}] (* Robert G. Wilson v, May 29 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, May 25 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 29 2004
STATUS
approved