OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,11,-2)
FORMULA
a(n) = 4*a(n-1) + 11*a(n-2) - 2*a(n-3) (derived from the minimal polynomial of the matrix M).
G.f.: -x*(-1+x)/((2*x+1)*(1-6*x+x^2)). a(n) = -3*(-2)^n/17+(3*A001109(n+1)-7*A001109(n))/17. - R. J. Mathar, Aug 12 2009
a(n) = (-3*(-1)^n*2^(2+n) - (3-2*sqrt(2))^n*(-6+sqrt(2)) + (6+sqrt(2))*(3+2*sqrt(2))^n) / 68. - Colin Barker, Mar 02 2017
EXAMPLE
a(6) = 4263 because M^3 = [13742,6930,4263; 25053,12671,7819; 41034,20790,12853]; alternatively, a(6) = 4*a(5) + 11*a(4) - 2*a(3) = 4*729+11*123-2*23 = 4263.
MAPLE
with(linalg): M[1]:=matrix(3, 3, [1, 1, 1, 4, 2, 1, 9, 3, 1]): for n from 2 to 25 do M[n]:=multiply(M[1], M[n-1]) od: seq(M[n][1, 3], n=1..25);
a[1]:=1:a[2]:=3:a[3]:=23:for n from 4 to 25 do a[n]:=4*a[n-1]+11*a[n-2]-2*a[n-3] od: seq(a[n], n=1..25);
MATHEMATICA
LinearRecurrence[{4, 11, -2}, {1, 3, 23}, 25] (* Paolo Xausa, Jul 19 2024 *)
PROG
(PARI) Vec(x*(1 - x) / ((1 + 2*x)*(1 - 6*x + x^2)) + O(x^30)) \\ Colin Barker, Mar 02 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson and Roger L. Bagula, Sep 17 2006
EXTENSIONS
Edited by N. J. A. Sloane, Dec 04 2006
STATUS
approved