OFFSET
0,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
FORMULA
G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5 + 3*x^6)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8).
a(n) = (63*n - 12 - 12*(n mod 7) + 2*((-n-1) mod 7))/49. - Wesley Ivan Hurt, Dec 25 2016
MAPLE
f := (k, m) -> floor(m*k/(k-1)):
a := n -> f(9, f(8, n)):
seq(a(n), n = 0..70); # Peter Luschny, May 03 2016
MATHEMATICA
f[k_, m_] := Floor[m*k/(k-1)];
a[n_] := f[9, f[8, n]];
Table[a[n], {n, 0, 70}] (* Jean-François Alcover, May 09 2016 *)
CoefficientList[Series[x (1 + x + x^2 + x^3 + x^4 + x^5 + 3 x^6)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)), {x, 0, 70}], x] (* or *)
Table[(63 n - 12 - 12 Mod[n, 7] + 2 Mod[-n - 1, 7])/49, {n, 0, 70}] (* Michael De Vlieger, Dec 25 2016 *)
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 5, 6, 9}, 90] (* Harvey P. Dale, May 08 2018 *)
PROG
(Magma) k:=9; f:=func<k, m | Floor(m*k/(k-1))>; [f(k, f(k-1, n)): n in [0..70]];
(Sage)
f = lambda k, m: floor(m*k/(k-1))
a = lambda n: f(9, f(8, n))
[a(n) for n in range(71)] # Peter Luschny, May 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, May 03 2016
STATUS
approved