OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Mathematics Stack Exchange question, Need formula for sequence related to Lucas/Fibonacci numbers (with answer by Robert Israel).
Index entries for linear recurrences with constant coefficients, signature (0,0,18,0,0,-1).
FORMULA
G.f.: 2*(x+1)*(x^4+6*x^3+5*x^2+6*x+1)/(x^6-18*x^3+1).
a(n) = (7/2)*( 3*F(2n)+F(2n-1) ) if n==1 (mod 3); otherwise a(n) = 2*( 3*F(2n)+F(2n-1) ), where F = A000045. [Robert Israel, see Link section]
MATHEMATICA
CoefficientList[Series[2 (x + 1) (x^4 + 6 x^3 + 5 x^2 + 6 x + 1)/(x^6 - 18 x^3 + 1), {x, 0, 30}], x]
LinearRecurrence[{0, 0, 18, 0, 0, -1}, {2, 14, 22, 58, 266, 398}, 30] (* Harvey P. Dale, Jul 27 2018 *)
PROG
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients (R!(2*x*(x+1)*(x^4+6*x^3+5*x^2+6*x+1)/(x^6-18*x^3+1)));
(Magma) A002878:=func<i | 3*Fibonacci(2*i)+Fibonacci(2*i-1)>; [IsOne(n mod 3) select (7/2)*A002878(n) else 2*A002878(n): n in [0..30]]; // Bruno Berselli, Sep 10 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 10 2014
STATUS
approved