OFFSET
0,3
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,0,0,-4,0,1,-1).
FORMULA
a(n) = floor(c*s*a(n-1)) + floor(d*r*a(n-2)), where r = (3 + sqrt(13))/2 (A098316), s = r/(r-1), c = 3, d = 1, a(0) = 1, a(1) = 1.
G.f.: (1 -4*x +2*x^2 -2*x^3 +3*x^4 -3*x^5 +x^6)/(1 -5*x +4*x^4 -x^6 +x^7).
MATHEMATICA
c = 3; d = 1; z = 40;
r = (c + Sqrt[c^2 + 4 d])/2; s = r/(r - 1); a[0] = 1; a[1] = 1;
a[n_] := a[n] = Floor[c*s*a[n - 1]] + Floor[d*r*a[n - 2]];
t = Table[a[n], {n, 0, z}]
CoefficientList[Series[(1-4*x+2*x^2-2*x^3+3*x^4-3*x^5+x^6)/(1-5*x+4*x^4-x^6+x^7), {x, 0, 50}], x] (* G. C. Greubel, Feb 08 2018 *)
LinearRecurrence[{5, 0, 0, -4, 0, 1, -1}, {1, 1, 7, 33, 164, 813, 4039}, 30] (* Harvey P. Dale, Sep 17 2024 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-4*x+2*x^2-2*x^3+3*x^4-3*x^5+x^6)/(1-5*x +4*x^4-x^6+x^7)) \\ G. C. Greubel, Feb 08 2018
(Magma) Q:=Rationals(); R<x>:=PowerSeriesRing(Q, 40); Coefficients(R!((1-4*x+2*x^2-2*x^3+3*x^4-3*x^5+x^6)/(1-5*x+4*x^4-x^6+x^7))); // G. C. Greubel, Feb 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 12 2016
STATUS
approved