OFFSET
1,2
COMMENTS
3 rows: 1 4 2, 2 1 4, 4 2 1 form a semi-magic square: row sums and columns and the diagonal = 7, the convergent of the sequence.
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,21,49).
FORMULA
Let M = the 3 X 3 matrix [1 4 2 / 2 1 4 / 4 2 1], then with M^n * [1 0 0] = [p q r], a(n) = p.
G.f.: -x*(7*x+1)^2 / ((7*x-1)*(7*x^2+4*x+1)). [Colin Barker, Dec 06 2012]
3*a(n) = 7^n +2 *(-1)^n *A213421(n). - R. J. Mathar, Nov 15 2019
EXAMPLE
a(4) = 769 since M^4 * [1 0 0] = [769 824 808].
MATHEMATICA
a[n_] := (MatrixPower[{{1, 4, 2}, {2, 1, 4}, {4, 2, 1}}, n].{{1}, {0}, {0}})[[1, 1]]; Table[ a[n], {n, 10}] (* Robert G. Wilson v, May 29 2004 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, May 25 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 29 2004
STATUS
approved