OFFSET
1,3
COMMENTS
a(n) is the sum of the terms of the 2nd half of the n-th row of the A027948 triangle. - Michel Marcus, Oct 01 2019
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,4,-8,-4,8,1,-2).
FORMULA
G.f.: x*(1 -x -2*x^2 + x^3 +6*x^4 -2*x^6)/((1-2*x)*(1-x^2)(1+x-x^2)*(1-x-x^2)).
a(n) = (3 +(-1)^n +2^(n+1) -(-1)^n*Fibonacci(n+1) -Fibonacci(n+4))/2. - G. C. Greubel, Sep 30 2019
MAPLE
f:= combinat[fibonacci]: seq((3 +(-1)^n +2^(n+1) -(-1)^n*f(n+1) -f(n+4))/2, n=1..40); # G. C. Greubel, Sep 30 2019
MATHEMATICA
Table[(3 +(-1)^n +2^(n+1) -(-1)^n*Fibonacci[n+1] -Fibonacci[n+4])/2, {n, 40}] (* G. C. Greubel, Sep 30 2019 *)
PROG
(PARI) vector(40, n, f=fibonacci; (3 +(-1)^n +2^(n+1) -(-1)^n*f(n+1) -f(n+4))/2 ) \\ G. C. Greubel, Sep 30 2019
(Magma) F:=Fibonacci; [(3 +(-1)^n +2^(n+1) -(-1)^n*F(n+1) -F(n+4))/2: n in [1..40]]; // G. C. Greubel, Sep 30 2019
(Sage) f=fibonacci; [(3 +(-1)^n +2^(n+1) -(-1)^n*f(n+1) -f(n+4))/2 for n in (1..40)] # G. C. Greubel, Sep 30 2019
(GAP) F:=Fibonacci;; List([1..40], n-> (3 +(-1)^n +2^(n+1) -(-1)^n*F(n+1) -F(n+4))/2); # G. C. Greubel, Sep 30 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved