%I #12 Apr 19 2016 08:14:14
%S 0,1,2,3,4,5,6,5,4,3,2,1,2,3,4,5,6,7,6,5,4,3,2,3,4,5,6,7,8,7,6,5,4,3,
%T 4,5,6,7,8,9,8,7,6,5,4,5,6,7,8,9,10,9,8,7,6,5,6,7,8,9,10,11,10,9,8,7,
%U 6,7,8,9,10,11,12,11,10,9,8,7,8,9,10,11
%N Six steps forward, five steps back.
%H Colin Barker, <a href="/A271859/b271859.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,0,1,-1).
%F a(n) = a(n-1) + a(n-11) - a(n-12) for n>11.
%F a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/11).
%F G.f.: x*(1+x+x^2+x^3+x^4+x^5-x^6-x^7-x^8-x^9-x^10) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10)). - _Colin Barker_, Apr 16 2016
%p A271859:=n->add((-1)^floor((2*i-2)/11), i=1..n): seq(A271859(n), n=0..200);
%t Table[Sum[(-1)^Floor[(2 i - 2)/11], {i, n}], {n, 0, 100}]
%o (PARI) concat(0, Vec(x*(1+x+x^2+x^3+x^4+x^5-x^6-x^7-x^8-x^9-x^10) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10)) + O(x^50))) \\ _Colin Barker_, Apr 16 2016
%Y Cf. A008611 (one step back, two steps forward).
%Y Cf. A058207 (three steps forward, two steps back).
%Y Cf. A260644 (four steps forward, three steps back).
%Y Cf. A271800 (five steps forward, four steps back).
%K nonn,easy
%O 0,3
%A _Wesley Ivan Hurt_, Apr 15 2016