OFFSET
1,5
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 1, -1).
FORMULA
a(n) ~ 3*n/7. - Charles R Greathouse IV, May 30 2026
MATHEMATICA
r = 2/7;
a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]
Table[a[n], {n, 1, 90}] (* A194227 *)
s[n_] := Sum[a[k], {k, 1, n}]
Table[s[n], {n, 1, 100}] (* A194228 *)
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 0, 1, 1, 2, 3, 3, 3}, 80] (* Harvey P. Dale, Apr 13 2025 *)
PROG
(PARI) a(n)=(n-1)\7*3+[3, 0, 0, 1, 1, 2, 3][n%7+1] \\ Charles R Greathouse IV, May 30 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 19 2011
STATUS
approved
