OFFSET
0,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1,-1).
FORMULA
G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + 3*x^7)/((1 + x)*(1 - x)^2*(1 + x^2) *(1 + x^4)).
a(n) = a(n-1) + a(n-8) - a(n-9).
a(n) = 1.25n + O(1). - Charles R Greathouse IV, Nov 07 2022
MAPLE
f := (k, m) -> floor(m*k/(k-1)):
a := n -> f(10, f(9, n)):
seq(a(n), n = 0..72); # Peter Luschny, May 03 2016
MATHEMATICA
f[k_, m_] := Floor[m*k/(k-1)];
a[n_] := f[10, f[9, n]];
Table[a[n], {n, 0, 72}] (* Jean-François Alcover, May 09 2016 *)
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 5, 6, 7, 10}, 90] (* Harvey P. Dale, Jun 22 2017 *)
PROG
(Magma) k:=10; 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(10, f(9, n))
[a(n) for n in range(73)] # Peter Luschny, May 03 2016
(PARI) is(n)=n%10<8 \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Bruno Berselli, May 03 2016
STATUS
approved