login
A287794
Nine steps forward, eight steps back.
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10
OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/17).
a(n) = a(n-1) + a(n-17) - a(n-18) for n > 17.
MAPLE
a:=n->add((-1)^floor((2*i-2)/17), i=1..n): seq(a(n), n=0..200);
MATHEMATICA
Table[Sum[(-1)^Floor[(2 i - 2)/17], {i, n}], {n, 0, 100}]
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1}, 100] (* Harvey P. Dale, Aug 25 2024 *)
CROSSREFS
Cf. A008611 (one step back, two steps forward).
Cf. A058207 (three steps forward, two steps back).
Cf. A260644 (four steps forward, three steps back).
Cf. A271800 (five steps forward, four steps back).
Cf. A271859 (six steps forward, five steps back).
Cf. A287655 (seven steps forward, six steps back).
Cf. A287793 (eight steps forward, seven steps back).
Sequence in context: A158289 A213652 A262734 * A179987 A073796 A017894
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 31 2017
STATUS
approved