%I #44 Apr 30 2021 06:17:52
%S 1,-2,4,-7,13,-23,42,-75,136,-244,441,-793,1431,-2576,4645,-8366,
%T 15080,-27167,48961,-88215,158970,-286439,516164,-930072,1675961,
%U -3019941,5441791,-9805712,17669353,-31838986,57371980,-103380599,186285573,-335674791,604865338,-1089929347,1963985232
%N Expansion of (1-x)/(1+x-2*x^2-x^3).
%C From _Johannes W. Meijer_, May 29 2010: (Start)
%C The absolute values of the a(n) represent the number of ways White can force checkmate in exactly (n+1) moves, n>=0, ignoring the fifty-move and the triple repetition rules, in the following chess position: White Ka1, Ra8, Bc1, Nb8, pawns a6, a7, b2, c6, d2, f6 and h6; Black Ke8, pawns b3, c7, d3, f7 and h7. (After Noam D. Elkies, see link; diagram 5).
%C The absolute values of the a(n) represent all paths of length n starting at the third (or fourth) node on the path graph P_6, see the Maple program.
%C (End)
%C For n>=1, abs(a(n-1)) is the number of compositions where there is no rise between every second pair of parts, starting with the second and third part; see example. Also, abs(a(n-1)) is the number of compositions of n where there is no fall between every second pair of parts, starting with the second and third part; see example. [_Joerg Arndt_, May 21 2013]
%H Noam D. Elkies, <a href="http://arxiv.org/abs/math/0508645">New Directions in Enumerative Chess Problems.</a>, arXiv:math/0508645 [math.CO]; 2005; The Electronic Journal of Combinatorics, 11 (2), 2004-2005. [From _Johannes W. Meijer_, May 29 2010]
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,2,1).
%F a(n+3) = -a(n+2)+2*a(n+1)+a(n), a(0)=1, a(1)=-2, a(2)=4. - _Wouter Meeussen_, Jan 02 2005
%F a(n) = (-1)^n * (A006053(n+1) + A006053(n+2)). G.f. of |a(n)|: (1+x)/(x^3 - 2*x^2 - x + 1). - _Ralf Stephan_, Aug 19 2013
%F a(n) = Sum_{r=1..6} ((-2)^n*(1-(-1)^r)*cos(Pi*r/7)^n*cot(Pi*r/14)*sin(3*Pi*r/7))/7. - _Herbert Kociemba_, Sep 17 2020
%e From _Joerg Arndt_, May 21 2013: (Start)
%e There are abs(a(6-1))=23 compositions of 6 where there is no rise between every second pair of parts:
%e v v <--= no rise over these positions
%e 01: [ 1 1 1 1 1 1 ]
%e 02: [ 1 1 1 2 1 ]
%e 03: [ 1 1 1 3 ]
%e 04: [ 1 2 1 1 1 ]
%e 05: [ 1 2 1 2 ]
%e 06: [ 1 2 2 1 ]
%e 07: [ 1 3 1 1 ]
%e 08: [ 1 3 2 ]
%e 09: [ 1 4 1 ]
%e 10: [ 1 5 ]
%e 11: [ 2 1 1 1 1 ]
%e 12: [ 2 1 1 2 ]
%e 13: [ 2 2 1 1 ]
%e 14: [ 2 2 2 ]
%e 15: [ 2 3 1 ]
%e 16: [ 2 4 ]
%e 17: [ 3 1 1 1 ]
%e 18: [ 3 2 1 ]
%e 19: [ 3 3 ]
%e 20: [ 4 1 1 ]
%e 21: [ 4 2 ]
%e 22: [ 5 1 ]
%e 23: [ 6 ]
%e There are abs(a(6-1))=23 compositions of 6 where there is no fall between every second pair of parts, starting with the second and third part:
%e v v <--= no fall over these positions
%e 01: [ 1 1 1 1 1 1 ]
%e 02: [ 1 1 1 1 2 ]
%e 03: [ 1 1 1 3 ]
%e 04: [ 1 1 2 1 1 ]
%e 05: [ 1 1 2 2 ]
%e 06: [ 1 1 3 1 ]
%e 07: [ 1 1 4 ]
%e 08: [ 1 2 2 1 ]
%e 09: [ 1 2 3 ]
%e 10: [ 1 5 ]
%e 11: [ 2 1 1 1 1 ]
%e 12: [ 2 1 1 2 ]
%e 13: [ 2 1 2 1 ]
%e 14: [ 2 1 3 ]
%e 15: [ 2 2 2 ]
%e 16: [ 2 4 ]
%e 17: [ 3 1 1 1 ]
%e 18: [ 3 1 2 ]
%e 19: [ 3 3 ]
%e 20: [ 4 1 1 ]
%e 21: [ 4 2 ]
%e 22: [ 5 1 ]
%e 23: [ 6 ]
%e (End)
%p with(GraphTheory): G:= PathGraph(6): A:=AdjacencyMatrix(G): nmax:=36; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[3,k], k=1..6) od: seq(a(n), n=0..nmax); # _Johannes W. Meijer_, May 29 2010
%t LinearRecurrence[{-1, 2, 1}, {1, -2, 4}, 40] (* _Jean-François Alcover_, Jan 08 2019 *)
%t a[n_]:=Sum[(-(-2)^(n+1)Cos[(Pi r)/7]^n Cot[(Pi r)/14]Sin[(3Pi r)/7])/7,{r,1,5,2}]
%t Table[a[n],{n,0,40}]//Round (* _Herbert Kociemba_, Sep 17 2020 *)
%o (PARI) Vec((1-x)/(1+x-2*x^2-x^3)+O(x^99)) \\ _Charles R Greathouse IV_, Sep 25 2012
%Y Cf. A028495, A068911, A094790, A287381 (absolute values).
%K sign,easy
%O 0,2
%A _N. J. A. Sloane_, Nov 17 2002