A105963 Expansion of (1+4*x)/(1-x-3*x^2).
1, 5, 8, 23, 47, 116, 257, 605, 1376, 3191, 7319, 16892, 38849, 89525, 206072, 474647, 1092863, 2516804, 5795393, 13345805, 30731984, 70769399, 162965351, 375273548, 864169601, 1989990245, 4582499048, 10552469783, 24299966927
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,3).
Programs
-
GAP
a:=[1,5];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
-
Magma
I:=[ 1,5]; [n le 2 select I[n] else Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jul 20 2013
-
Maple
seq(coeff(series((1+4*x)/(1-x-3*x^2), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Jan 15 2020
-
Mathematica
CoefficientList[Series[(1+4x)/(1-x-3x^2), {x,0,40}], x] (* Vincenzo Librandi, Jul 20 2013 *) Table[Round[3^((n-1)/2)*(Sqrt[3]*Fibonacci[n+1, 1/Sqrt[3]] + 4*Fibonacci[n, 1/Sqrt[3]] )], {n,0,40}] (* G. C. Greubel, Jan 15 2020 *)
-
PARI
Vec((1+4*x)/(1-x-3*x^2)+O(x^40)) \\ Charles R Greathouse IV, Sep 27 2012
-
SageMath
def A077952_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( (1+4*x)/(1-x-3*x^2) ).list() A077952_list(30) # G. C. Greubel, Jan 15 2020
Formula
From Colin Barker, May 01 2019: (Start)
a(n) = (2^(-1-n)*((1-sqrt(13))^n*(-9+sqrt(13)) + (1+sqrt(13))^n*(9+sqrt(13)))) / sqrt(13).
a(n) = a(n-1) + 3*a(n-2) for n > 1. (End)
a(n) = 3^((n-1)/2)*( sqrt(3)*Fibonacci(n+1, 1/sqrt(3)) + 4*Fibonacci(n, 1/sqrt(3)) ). - G. C. Greubel, Jan 15 2020
Comments