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, -1, 1).
FORMULA
From Chai Wah Wu, Jun 21 2016: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3.
G.f.: 3*x^2*(2 + x)/(1 - x + x^3 - x^4). (End)
MATHEMATICA
PadLeft[First@ #, Abs@ Last@ # + Length@ First@ #] &@ RealDigits[N[1/143, 120]] (* Michael De Vlieger, Jun 21 2016 *)
PROG
(Magma) I:=[0, 0, 6, 9]; [n le 4 select I[n] else Self(n-1)- Self(n-3)+Self(n-4): n in [1..100]]; // Vincenzo Librandi, Jun 21 2016
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved