OFFSET
0,4
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 17 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 4.
G.f.: (x^4 + x^3 + 1)/(x^5 - x^4 - x + 1). (End)
a(n) = 2*floor(n/4) + floor((n+1)/4) + 1. - Ridouane Oudra, Jan 26 2024
Sum_{n>=0} (-1)^n/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Feb 11 2024
MATHEMATICA
CoefficientList[Series[(x^4 + x^3 + 1) / (x^5 - x^4 - x + 1), {x, 0, 100}], x] (* Vincenzo Librandi, Jun 18 2016 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {1, 1, 1, 2, 4}, 100] (* Harvey P. Dale, Apr 18 2023 *)
PROG
(Magma) I:=[1, 1, 1, 2, 4]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..80]]; // Vincenzo Librandi, Jun 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Aug 18 2007
STATUS
approved