OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1,-1)
FORMULA
G.f.: x*(2*x^9-2*x^8-6*x^7+3*x^6-x^5+3*x^4-3*x^3+x^2-4*x+8) / (x^9-x^8-x+1).
a(n) = 1 + a(n-8) for n>9.
EXAMPLE
a(17) = 8:
._._._._._._._._._._._._._._._._._.
| | | |
| | | |
| | | |
| |_______| |
| | |_________|
| | | | |
| | | |___|
|_______________|_______|_____|_|_|
MAPLE
a:= n-> `if`(n=1, 8, iquo(n, 8, 'r') +[0, 6, 4, 5, 2, 5, 4, 7][r+1]):
seq(a(n), n=0..100);
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 8, 4, 5, 2, 5, 4, 7, 1, 7, 5}, 80] (* Harvey P. Dale, Sep 07 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jun 12 2013
STATUS
approved