OFFSET
0,3
COMMENTS
In general, the ordinary generating function for the recurrence relation b(n) = k*b(n - 1) - m*b(n - 2), with n>1 and b(0)=0, b(1)=1, is x/(1 - k*x + m*x^2). This recurrence gives the closed form b(n) = (2^(-n)*((sqrt(k^2 - 4*m) + k)^n - (k - sqrt(k^2 - 4*m))^n))/sqrt(k^2 - 4*m).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..965
Index entries for linear recurrences with constant coefficients, signature (11,-3).
FORMULA
G.f.: x/(1 - 11*x + 3*x^2).
a(n) = ( ((11 + sqrt(109))/2)^n - ((11 - sqrt(109))/2)^n )/sqrt(109).
MATHEMATICA
LinearRecurrence[{11, -3}, {0, 1}, 20] (* or *) Table[(((11 + Sqrt[109])/2)^n - ((11 - Sqrt[109])/2)^n)/Sqrt[109], {n, 0, 20}]
PROG
(PARI) x='x+O('x^30); concat([0], Vec(x/(1-11*x+3*x^2))) \\ G. C. Greubel, Jan 14 2018
(Magma) I:=[0, 1]; [n le 2 select I[n] else 11*Self(n-1) - 3*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 14 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Feb 02 2016
STATUS
approved