OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 6, 0, -4).
FORMULA
G.f.: (1 + x - 3*x^2 - 2*x^3) / (1 - 6*x^2 + 4*x^4). a(n) = 6*a(n-2) - 4*a(n-4). - Michael Somos, Mar 05 2003
a(n) = (1/20*10^(1/2) + 1/4)*(sqrt(3 + sqrt(5)))^n + (1/20*10^(1/2) + 1/4)*(sqrt(3 - sqrt(5)))^n + ( - 1/20*10^(1/2) + 1/4)*( - (sqrt(3 + sqrt(5))))^n + ( - 1/20*10^(1/2) + 1/4)*( - (sqrt(3 - sqrt(5))))^n. - Richard Choulet, Dec 07 2008
0 = a(n)*(+2*a(n+2)) + a(n+1)*(+2*a(n+1) - 7*a(n+2) + a(n+3)) + a(n+2)*(+a(n+2)) for all n in Z. - Michael Somos, May 25 2014
EXAMPLE
G.f. = 1 + x + 3*x^2 + 4*x^3 + 14*x^4 + 20*x^5 + 72*x^6 + 104*x^7 + 376*x^8 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 2^n, 1] SeriesCoefficient[ (1 + x - 3*x^2 - 2*x^3)/(1 - 6*x^2 + 4*x^4), {x, 0, Abs@n}]; (* Michael Somos, May 25 2014 *)
a[ n_] := 2^Quotient[ n - 1, 2] If[ OddQ@n, Fibonacci@n, LucasL@n]; (* Michael Somos, May 25 2014 *)
LinearRecurrence[{0, 6, 0, -4}, {1, 1, 3, 4}, 40] (* Harvey P. Dale, Dec 07 2014 *)
PROG
(PARI) {a(n) = if( n<0, 2^n, 1) * polcoeff( (1 + x - 3*x^2 - 2*x^3) / (1 - 6*x^2 + 4*x^4) + x * O(x^abs(n)), abs(n))}; /* Michael Somos, May 25 2014 */
(PARI) {a(n) = 2^((n - 1)\2) * if( n%2, fibonacci(n), fibonacci(n-1) + fibonacci(n+1))}; /* Michael Somos, May 25 2014 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Feb 22 2003
STATUS
approved