OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,1,-1,-1).
FORMULA
G.f.: (1 + 2*x^2)/((1-x^3)*(1-x-x^2)).
From G. C. Greubel, Sep 26 2019: (Start)
a(n) = (Fibonacci(n) + 4*Fibonacci(n+1) - A102283(n) - 2)/2.
a(n) = (Fibonacci(n+1) + Lucas(n+2) - 2*sin(2*Pi*n/3)/sqrt(3) - 2)/2. (End)
MAPLE
seq(coeff(series((1 + 2*x^2)/((1-x^3)*(1-x-x^2)), x, n+1), x, n), n = 0..40); # G. C. Greubel, Sep 26 2019
MATHEMATICA
LinearRecurrence[{1, 1, 1, -1, -1}, {1, 1, 4, 6, 10}, 41] (* or *) Table[ (Fibonacci[n+1] +LucasL[n+2] -2*Sin[2*Pi*n/3]/Sqrt[3] -2)/2, {n, 0, 40}] (* G. C. Greubel, Sep 26 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1 + 2*x^2)/((1-x^3)*(1-x-x^2))) \\ G. C. Greubel, Sep 26 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1 + 2*x^2)/((1-x^3)*(1-x-x^2)) )); // G. C. Greubel, Sep 26 2019
(Sage)
def A027976_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1 + 2*x^2)/((1-x^3)*(1-x-x^2))).list()
A027976_list(40) # G. C. Greubel, Sep 26 2019
(GAP) a:=[1, 1, 4, 6, 10];; for n in [6..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]-a[n-4]-a[n-5]; od; a; # G. C. Greubel, Sep 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(28) onward added by G. C. Greubel, Sep 26 2019
STATUS
approved