OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4,1).
FORMULA
a(n) = 3*a(n - 1) - a(n - 2) + 12.
a(n) = (1/10)*(-120 + (65 - 11*sqrt(5))*((1/2)*(3 - sqrt(5)))^n + ((1/2)*(3 + sqrt(5)))^n*(65 + 11*sqrt(5))).
From R. J. Mathar, Apr 04 2009: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
G.f.: x*(1+9*x+2*x^2)/((1-x)*(1-3*x+x^2)). (End)
a(n) = 12*Fibonacci(2*n-1) + Fibonacci(2*n-3) - 12. - G. C. Greubel, Nov 21 2019
MAPLE
with(combinat); seq(12*fibonacci(2*n-1) +fibonacci(2*n-3) -12, n=1..30); # G. C. Greubel, Nov 21 2019
MATHEMATICA
LinearRecurrence[{4, -4, 1}, {1, 13, 50}, 30] (* G. C. Greubel, Sep 14 2017 *)
With[{F=Fibonacci}, Table[12*(F[2*n-1]-1) + F[2*n-3], {n, 30}]] (* G. C. Greubel, Nov 21 2019 *)
PROG
(PARI) x='x+O('x^30); Vec(x*(1+9*x+2*x^2)/((1-x)*(x^2-3*x+1))) \\ G. C. Greubel, Sep 14 2017
(PARI) vector(30, n, 12*fibonacci(2*n-1) +fibonacci(2*n-3) -12) \\ G. C. Greubel, Nov 21 2019
(Magma) F:= Fibonacci; [12*F(2*n-1) +F(2*n-3) -12: n in [1..30]]; // G. C. Greubel, Nov 21 2019
(Sage) f=fibonacci; [12*f(2*n-1) + f(2*n-3) -12 for n in (1..30)] # G. C. Greubel, Nov 21 2019
(GAP) F:=Fibonacci;; List([1..30], n-> 12*F(2*n-1) +F(2*n-3) -12 ); # G. C. Greubel, Nov 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 10 2006
EXTENSIONS
Edited and new name based on g.f. by G. C. Greubel and Joerg Arndt, Sep 14 2017
STATUS
approved