login
Expansion of g.f. x*(1 +30*x +49*x^2 -71*x^3 -116*x^4)/((1+2*x)*(1-2*x^2) *(1-2*x-4*x^2)).
1

%I #28 Sep 08 2022 08:45:27

%S 1,30,59,237,698,2346,7452,24308,78328,253992,820976,2658384,8599520,

%T 27834528,90062784,291471680,943177600,3052274304,9877192448,

%U 31963612416,103435730432,334726433280,1083194735616,3505297298432

%N Expansion of g.f. x*(1 +30*x +49*x^2 -71*x^3 -116*x^4)/((1+2*x)*(1-2*x^2) *(1-2*x-4*x^2)).

%H G. C. Greubel, <a href="/A121960/b121960.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,10,8,-16,-16).

%F a(n) = 10*a(n-2) + 8*a(n-3) - 16*a(n-4) - 16*a(n-5).

%F From _G. C. Greubel_, Oct 05 2019: (Start)

%F a(2*n) = 2^(2*n-3)*(47*Fibonacci(2*n+1) -40*Fibonacci(2*n) +1) + 10*2^(n-3).

%F a(2*n+1) = 4^(n-1)*(47*Fibonacci(2*n+2) -40*Fibonacci(2*n+1) -1) -2^(n-1). (End)

%p 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

%t 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}]

%t 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 *)

%t LinearRecurrence[{0,10,8,-16,-16},{1,30,59,237,698},30] (* _Harvey P. Dale_, Jun 09 2016 *)

%t 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 *)

%o (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

%o (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

%o (Sage)

%o def A121960_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o 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()

%o a=A121960_list(30); a[1:] # _G. C. Greubel_, Oct 05 2019

%o (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

%Y Cf. A000045.

%K nonn,easy

%O 1,2

%A _Roger L. Bagula_, Sep 02 2006

%E Definition replaced by g.f. - the Assoc. Eds. of the OEIS, Mar 27 2010