[go: up one dir, main page]

login
A121955
Expansion of x^2*(9 + 8*x - 8*x^2)/((1+x-x^2)*(1-2*x-4*x^2)).
1
0, 9, 17, 72, 209, 711, 2250, 7357, 23693, 76848, 248413, 804307, 2602122, 8421705, 27251521, 88190472, 285386041, 923535567, 2988612714, 9671371877, 31297187845, 101279874144, 327748481957, 1060616489147, 3432226859754
OFFSET
1,2
FORMULA
a(n) = a(n-1) + 7*a(n-2) + 2*a(n-3) - 4*a(n-4). - R. J. Mathar, Apr 04 2009
a(n) = ((-1)^n*Fibonacci(n+2) + 2^n*(5*Fibonacci(n+1) - 4*Fibonacci(n)))/3. - G. C. Greubel, Oct 07 2019
MAPLE
with(combinat); f:=fibonacci; seq(((-1)^n*f(n+2) + 2^n*(5*f(n+1) - 4*f(n)))/3, n=1..30); # G. C. Greubel, Oct 07 2019
MATHEMATICA
M = {{0, 1, 1, 1, 0, 1}, {1, 0, 1, 1, 1, 0}, {1, 1, 0, 0, 1, 1}, {1, 1, 0, 0, 0, 0}, {0, 1, 1, 0, 0, 0}, {1, 0, 1, 0, 0, 0}}; v[1]={0, 1, 1, 2, 3, 5}; v[n_]:= v[n]= M.v[n-1]; Table[Floor[v[n][[1]]], {n, 50}]
LinearRecurrence[{1, 7, 2, -4}, {0, 9, 17, 72}, 30] (* Harvey P. Dale, Jul 29 2013 *)
With[{F=fibonacci}, Table[((-1)^n*F[n+2] + 2^n*(5*F[n+1]-4*F[n]))/3, {n, 30}]] (* G. C. Greubel, Oct 07 2019 *)
PROG
(PARI) vector(30, n, f=fibonacci; ((-1)^n*f(n+2) + 2^n*(5*f(n+1) - 4*f(n)))/3) \\ G. C. Greubel, Oct 07 2019
(Magma) F:=Fibonacci; [((-1)^n*F(n+2) + 2^n*(5*F(n+1) - 4*F(n)))/3: n in [1..30]]; // G. C. Greubel, Oct 07 2019
(Sage) f=fibonacci; [((-1)^n*f(n+2) + 2^n*(5*f(n+1) - 4*f(n)))/3 for n in (1..30)] # G. C. Greubel, Oct 07 2019
(GAP) F:=Fibonacci;; List([1..30], n-> ((-1)^n*F(n+2) + 2^n*(5*F(n+1) - 4*F(n)))/3); # G. C. Greubel, Oct 07 2019
CROSSREFS
Cf. A000045.
Sequence in context: A319018 A101304 A146601 * A151793 A118852 A118527
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 01 2006
EXTENSIONS
New name (g.f. given by Mathar) by Joerg Arndt, Feb 06 2013
STATUS
approved