A100284 Expansion of (1-4*x-x^2)/((1-x)*(1-4*x-5*x^2)).
1, 1, 5, 21, 105, 521, 2605, 13021, 65105, 325521, 1627605, 8138021, 40690105, 203450521, 1017252605, 5086263021, 25431315105, 127156575521, 635782877605, 3178914388021, 15894571940105, 79472859700521, 397364298502605
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,1,-5)
Programs
-
Magma
[(5^n +2*(-1)^n +3)/6: n in [0..40]]; // G. C. Greubel, Feb 06 2023
-
Mathematica
CoefficientList[Series[(1-4x-x^2)/((1-x)(1-4x-5x^2)),{x,0,30}],x] (* or *) LinearRecurrence[{5,1,-5},{1,1,5},30] (* Harvey P. Dale, Apr 01 2013 *)
-
SageMath
def A100284(n): return (1/6)*(5^n +1 +4*((n+1)%2)) [A100284(n) for n in range(41)] # G. C. Greubel, Feb 06 2023
Formula
a(n) = 5*a(n-1) + a(n-2) - 5*a(n-3).
a(n) = (1/6)*(3 + 5^n + 2*(-1)^n).
E.g.f.: (1/6)*(exp(5*x) + 3*exp(x) + 2*exp(-x)). - G. C. Greubel, Feb 06 2023
Comments