OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,10,8,-16,-16).
FORMULA
a(n) = 10*a(n-2) + 8*a(n-3) - 16*a(n-4) - 16*a(n-5).
From G. C. Greubel, Oct 05 2019: (Start)
a(2*n) = 2^(2*n-3)*(47*Fibonacci(2*n+1) -40*Fibonacci(2*n) +1) + 10*2^(n-3).
a(2*n+1) = 4^(n-1)*(47*Fibonacci(2*n+2) -40*Fibonacci(2*n+1) -1) -2^(n-1). (End)
MAPLE
seq(coeff(series(x*(1+30*x+49*x^2-71*x^3-116*x^4)/((1-2*x^2)*(1-8*x^2-8*x^3)), x, n+1), x, n), n = 1..40); # G. C. Greubel, Oct 05 2019
MATHEMATICA
M = {{0, 1, 0, 1, 1, 0, 0, 1}, {1, 0, 1, 0, 1, 1, 0, 0}, {0, 1, 0, 1, 0, 1, 1, 0}, {1, 0, 1, 0, 0, 0, 1, 1}, {1, 1, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 0, 0}, {1, 0, 0, 1, 0, 0, 0, 0}}; v[1] = Table[Fibonacci[n], {n, 8}]; v[n_]:= v[n]= M.v[n-1]; Table[Floor[v[n][[1]]], {n, 50}]
CoefficientList[Series[x(1+30x+49x^2-71x^3-116x^4)/((2x+1)(4x^2+2x-1) (2x^2-1)), {x, 0, 30}], x] (* Harvey P. Dale, Jul 24 2011 *)
LinearRecurrence[{0, 10, 8, -16, -16}, {1, 30, 59, 237, 698}, 30] (* Harvey P. Dale, Jun 09 2016 *)
Table[If[EvenQ[n], (2^n*(47*Fibonacci[n+1] -40*Fibonacci[n] +1) + 10*2^(n/2))/8, (2^n*(47*Fibonacci[n+1] - 40*Fibonacci[n] -1) - 2^((n-1)/2 +2))/8], {n, 40}] (* G. C. Greubel, Oct 05 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec(x*(1+30*x+49*x^2-71*x^3-116*x^4)/((1-2*x^2) *(1-8*x^2-8*x^3))) \\ G. C. Greubel, Oct 05 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x*(1+30*x+49*x^2-71*x^3-116*x^4)/((1-2*x^2)*(1-8*x^2-8*x^3)) )); // G. C. Greubel, Oct 05 2019
(Sage)
def A121960_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1+30*x+49*x^2-71*x^3-116*x^4)/((1-2*x^2)*(1-8*x^2-8*x^3))).list()
a=A121960_list(30); a[1:] # G. C. Greubel, Oct 05 2019
(GAP) a:=[1, 30, 59, 237, 698];; for n in [6..40] do a[n]:=10*a[n-2]+8*a[n-3] -16*a[n-4]-16*a[n-5]; od; a; # G. C. Greubel, Oct 05 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 02 2006
EXTENSIONS
Definition replaced by g.f. - the Assoc. Eds. of the OEIS, Mar 27 2010
STATUS
approved