OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (40, 40, -820).
FORMULA
G.f.: (t^3 + 2*t^2 + 2*t + 1)/(820*t^3 - 40*t^2 - 40*t + 1).
a(n) = 40*a(n-1) + 40*a(n-2) - 820*a(n-3), n > 0. - Muniru A Asiru, Oct 24 2018
G.f.: (1+x)*(1-x^3)/(1 - 41*x + 860*x^3 - 820*x^4). - G. C. Greubel, Apr 27 2019
MAPLE
seq(coeff(series((x^3+2*x^2+2*x+1)/(820*x^3-40*x^2-40*x+1), x, n+1), x, n), n = 0 .. 20); # Muniru A Asiru, Oct 24 2018
MATHEMATICA
CoefficientList[Series[(t^3+2*t^2+2*t+1)/(820*t^3-40*t^2-40*t+1), {t, 0, 20}], t] (* Wesley Ivan Hurt, Apr 12 2017 *)
Join[{1}, LinearRecurrence[{40, 40, -820}, {42, 1722, 69741}, 20]] (* Vincenzo Librandi, Apr 14 2017 *)
coxG[{3, 820, -40}] (* The coxG program is at A169452 *) (* G. C. Greubel, Apr 27 2019 *)
PROG
(Magma) I:=[1, 42, 1722, 69741]; [n le 4 select I[n] else 40*Self(n-1) +40*Self(n-2)-820*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Apr 14 2017
(Magma) R<t>:=PowerSeriesRing(Integers(), 20); Coefficients(R!((t^3 +2*t^2+2*t+1)/(820*t^3-40*t^2-40*t+1))); // G. C. Greubel, Oct 24 2018
(PARI) my(t='t+O('t^20)); Vec((t^3+2*t^2+2*t+1)/(820*t^3-40*t^2-40*t+1)) \\ G. C. Greubel, Oct 24 2018
(GAP) a:=[42, 1722, 69741];; for n in [4..20] do a[n]:=40*a[n-1]+40*a[n-2] -820*a[n-3]; od; Concatenation([1], a); # Muniru A Asiru, Oct 24 2018
(Sage) ((1+x)*(1-x^3)/(1 -41*x +860*x^3 -820*x^4)).series(x, 20).coefficients(x, sparse=False) # G. C. Greubel, Apr 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved