OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, -1, 1).
FORMULA
From Chai Wah Wu, Jun 21 2016: (Start)
a(n) = a(n-1) - a(n-4) + a(n-5) for n > 5.
G.f.: x^2*(-5*x^3 + 4*x^2 - 2*x - 6)/((x - 1)*(x^4 + 1)). (End)
MATHEMATICA
Join[{0, 0}, RealDigits[1/146, 10, 120][[1]]] (* or *) PadRight[{0}, 120, {5, 0, 6, 8, 4, 9, 3, 1}] (* Harvey P. Dale, Mar 23 2016 *)
PadLeft[First@ #, Abs@ Last@ # + Length@ First@ #] &@ RealDigits[N[1/146, 120]] (* Bruno Berselli, Jun 21 2016 *)
PROG
(Magma) I:=[0, 0, 6, 8, 4, 9]; [n le 6 select I[n] else Self(n-1)-Self(n-4)+Self(n-5): n in [1..100]]; // Vincenzo Librandi, Jun 21 2016
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
STATUS
approved