OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
From Chai Wah Wu, Jun 10 2020: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6) for n > 6.
G.f.: x^3*(x + 1)/((x-1)^2*(1+x+x^2+x^3+x^4)). (End)
a(n) = floor((n+1)/5) + floor((n+2)/5). - Ridouane Oudra, Dec 14 2021
MAPLE
seq(floor((n+1)/5)+floor((n+2)/5), n=1..80); # Ridouane Oudra, Dec 14 2021
MATHEMATICA
r = 1/5;
a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]
Table[a[n], {n, 1, 90}] (* A194222 *)
s[n_] := Sum[a[k], {k, 1, n}]
Table[s[n], {n, 1, 100}] (* A118015 *)
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 0, 1, 2, 2, 2}, 80] (* Harvey P. Dale, Jun 06 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 19 2011
STATUS
approved