A121801 Expansion of 2*x^2*(3-x)/((1+x)*(1-3*x+x^2)).
0, 6, 10, 32, 78, 210, 544, 1430, 3738, 9792, 25630, 67106, 175680, 459942, 1204138, 3152480, 8253294, 21607410, 56568928, 148099382, 387729210, 1015088256, 2657535550, 6957518402, 18215019648, 47687540550, 124847601994
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
Programs
-
GAP
List([1..30], n-> 2*(Lucas(1,-1,2*n+1)[2] +4*(-1)^n)/5 ); # G. C. Greubel, Jul 22 2019
-
Magma
I:=[0,6,10]; [n le 3 select I[n] else 2*Self(n-1)+2*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Nov 02 2014
-
Magma
[2*(Lucas(2*n+1) +4*(-1)^n)/5: n in [1..30]]; // G. C. Greubel, Jul 22 2019
-
Mathematica
c[i_, k_] := Floor[Mod[i/2^k, 2]] b[i_, k_] := If[c[i, k] == 0 && c[ i, k + 1] == 0, 0, If[c[i, k] == 1 && c[i, k + 1] == 1, 0, 1]] n = 4 - 1; M = Table[If[Sum[b[i, k]*b[j, k], {k, 0, n}] == 0, 1, 0], {j, 0, n}, {i, 0, n}] v[1] = {0, 1, 2, 3} v[n_] := v[n] = M.v[n - 1] a = Table[Floor[v[n][[1]]], {n, 1, 50}] Det[M - x*IdentityMatrix[4]] Factor[%] aaa = Table[x /. NSolve[Det[M - x*IdentityMatrix[4]] == 0, x][[n]], {n, 1, 4}] Abs[aaa] a1 = Table[N[a[[n]]/a[[n - 1]]], {n, 7, 50}] CoefficientList[Series[2*x*(3-x)/((1+x)*(1-3*x+x^2)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jun 16 2014 *) LinearRecurrence[{2,2,-1},{0,6,10},30] (* Harvey P. Dale, Jan 06 2015 *) With[{F=Fibonacci}, Table[2*(F[n]*F[n+1] +(-1)^n), {n,30}]] (* G. C. Greubel, Jul 22 2019 *)
-
PARI
concat(0,Vec(2*(3-x)/((1+x)*(1-3*x+x^2))+O(x^30))) \\ Charles R Greathouse IV, Sep 25 2012
-
PARI
vector(30, n, f=fibonacci; 2*(f(n)*f(n+1)+(-1)^n) ) \\ G. C. Greubel, Jul 22 2019
-
Sage
[2*(lucas_number2(2*n+1,1,-1) +4*(-1)^n)/5 for n in (1..30)] # G. C. Greubel, Jul 22 2019
Formula
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
a(n) = -2*A121646(n+1).
G.f.: 2*x^2*(3-x)/((1+x)*(x^2-3*x+1)) (see name).
From Wolfdieter Lang, Nov 01 2014: (Start)
G.f.: (-10 + 8/(1+x) + 2*(1+x)/(1-3*x+x^2))/5 (partial fraction decomposition).
a(n) = (8*(-1)^n + 2*(F(2*(n+1)) + F(2*n)))/5 for n >= 1. a(0) = 0.
(End)
a(n) = 2*(Fibonacci(n)*Fibonacci(n+1) + (-1)^n). - G. C. Greubel, Jul 22 2019
Extensions
Edited by the Associate Editors of the OEIS, Aug 18 2009
Comments