OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-13,13,-6,1).
FORMULA
For n>1, a(n) = Fibonacci(2*n+4) - (2*n^2 + 3*n + 3).
a(1)=1, a(2)=4, a(3)=25, a(4)=97, a(5)=309, a(6)=894, a(n) = 6*a(n-1) - 13*a(n-2) +13*a(n-3) -6*a(n-4) +a(n-5). - Harvey P. Dale, Apr 20 2012
G.f.: x*(1 -2*x +14*x^2 -14*x^3 +6*x^4 -x^5)/((1-x)^3*(1-3*x+x^2)). - Colin Barker, Nov 19 2014
a(n) = Sum_{j=0..n-1} binomial(2*n-j, j+3), with a(1)=1. - G. C. Greubel, Sep 29 2019
MAPLE
with(combinat); seq(`if`(n=1, 1, fibonacci(2*n+4) -(2*n^2 +3*n +3)), n=1..40); # G. C. Greubel, Sep 29 2019
MATHEMATICA
Join[{1}, Table[Fibonacci[2n+4]-2n^2-3n-3, {n, 2, 40}]] (* or *) Join[ {1}, LinearRecurrence[{6, -13, 13, -6, 1}, {4, 25, 97, 309, 894}, 40]] (* Harvey P. Dale, Apr 20 2012 *)
CoefficientList[Series[(x^5-6x^4+14x^3-14x^2+2x-1)/((x-1)^3(x^2-3x+1)), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 20 2014 *)
PROG
(PARI) Vec(x*(x^5-6*x^4+14*x^3-14*x^2+2*x-1)/((x-1)^3*(x^2-3*x+1)) + O(x^40)) \\ Colin Barker, Nov 19 2014
(PARI) vector(40, n, if(n==1, 1, fibonacci(2*n+4) -(2*n^2 +3*n +3)) ) \\ G. C. Greubel, Sep 29 2019
(Magma) [1] cat [Fibonacci(2*n+4) -(2*n^2 +3*n +3): n in [2..40]]; // G. C. Greubel, Sep 29 2019
(Sage) [1]+[fibonacci(2*n+4) -(2*n^2 +3*n +3) for n in (2..40)] # G. C. Greubel, Sep 29 2019
(GAP) Concatenation([1], List([2..40], n-> Fibonacci(2*n+4) -(2*n^2 +3*n +3)) ); # G. C. Greubel, Sep 29 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Apr 20 2012
STATUS
approved