OFFSET
0,2
COMMENTS
Let F be a homogeneous polynomial in n + 4 variables f0, f1, f2, g0, g1, ..., gn, defined as the determinant of a Sylvester matrix of polynomials f2*x^2 + f1*x + f0 and gn*x^n + ... + g1*x + g0. It appears that a(n) is equal to the l1-norm of F, i.e., the sum of absolute values of coefficients of F. - Anton Mosunov, Apr 13 2019
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
FORMULA
a(n) = Sum_{k=0..floor(n/2)} A027170(n-k, k).
G.f.: (1 + x^2)/((1 - x)^2*(1 - x - x^2)).
From Colin Barker, Mar 10 2017: (Start)
a(n) = -4 + (2^(-1-n)*((1-sqrt(5))^n*(-15+7*sqrt(5)) + (1+sqrt(5))^n*(15+7*sqrt(5))))/sqrt(5) - 2*(1+n).
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n>3.
(End)
MATHEMATICA
LinearRecurrence[{3, -2, -1, 1}, {1, 3, 8, 17}, 40] (* Vladimir Joseph Stephan Orlovsky, Jan 25 2012 *)
Table[LucasL[n+4]-2*(n+3), {n, 0, 40}] (* G. C. Greubel, Jul 24 2019 *)
PROG
(Magma) [Lucas(n+4) - (2*n+6): n in [0..40]]; // Vincenzo Librandi, Apr 16 2011
(PARI) Vec((1 + x^2)/((1 - x)^2*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Mar 10 2017
(PARI) vector(40, n, n--; f=fibonacci; f(n+5)+f(n+3)-2*(n+3)) \\ G. C. Greubel, Jul 24 2019
(Sage) [lucas_number2(n+4, 1, -1) -2*(n+3) for n in range(40)] # G. C. Greubel, Apr 14 2019
(GAP) List([0..40], n-> Lucas(1, -1, n+4)[2] -2*(n+3)); # G. C. Greubel, Jul 24 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved