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 (0,1,1,0,-1)
FORMULA
G.f.: x*(2*x^5-6*x^3-4*x^2+3*x+6)/(x^5-x^3-x^2+1).
a(n) = 1 + a(n-6) for n>7.
EXAMPLE
a(13) = 6:
._._._._._._._._._._._._._.
| | | |
| | | |
| | |_____|
| |_______| |
| | | | |
|___________|___|___|_____|
MAPLE
a:= n-> `if`(n=1, 6, iquo(n, 6, 'r') +[0, 4, 3, 2, 3, 5][r+1]):
seq(a(n), n=0..100);
MATHEMATICA
Join[{0, 6}, LinearRecurrence[{0, 1, 1, 0, -1}, {3, 2, 3, 5, 1}, 80]] (* Harvey P. Dale, Jun 03 2014 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jun 12 2013
STATUS
approved