cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A078038 Expansion of (1-x)/(1+x-2*x^2-x^3).

This page as a plain text file.
%I A078038 #44 Apr 30 2021 06:17:52
%S A078038 1,-2,4,-7,13,-23,42,-75,136,-244,441,-793,1431,-2576,4645,-8366,
%T A078038 15080,-27167,48961,-88215,158970,-286439,516164,-930072,1675961,
%U A078038 -3019941,5441791,-9805712,17669353,-31838986,57371980,-103380599,186285573,-335674791,604865338,-1089929347,1963985232
%N A078038 Expansion of (1-x)/(1+x-2*x^2-x^3).
%C A078038 From _Johannes W. Meijer_, May 29 2010: (Start)
%C A078038 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 A078038 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 A078038 (End)
%C A078038 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 A078038 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 A078038 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,2,1).
%F A078038 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 A078038 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 A078038 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 A078038 From _Joerg Arndt_, May 21 2013: (Start)
%e A078038 There are abs(a(6-1))=23 compositions of 6 where there is no rise between every second pair of parts:
%e A078038           v   v    <--= no rise over these positions
%e A078038 01:  [ 1 1 1 1 1 1 ]
%e A078038 02:  [ 1 1 1 2 1 ]
%e A078038 03:  [ 1 1 1 3 ]
%e A078038 04:  [ 1 2 1 1 1 ]
%e A078038 05:  [ 1 2 1 2 ]
%e A078038 06:  [ 1 2 2 1 ]
%e A078038 07:  [ 1 3 1 1 ]
%e A078038 08:  [ 1 3 2 ]
%e A078038 09:  [ 1 4 1 ]
%e A078038 10:  [ 1 5 ]
%e A078038 11:  [ 2 1 1 1 1 ]
%e A078038 12:  [ 2 1 1 2 ]
%e A078038 13:  [ 2 2 1 1 ]
%e A078038 14:  [ 2 2 2 ]
%e A078038 15:  [ 2 3 1 ]
%e A078038 16:  [ 2 4 ]
%e A078038 17:  [ 3 1 1 1 ]
%e A078038 18:  [ 3 2 1 ]
%e A078038 19:  [ 3 3 ]
%e A078038 20:  [ 4 1 1 ]
%e A078038 21:  [ 4 2 ]
%e A078038 22:  [ 5 1 ]
%e A078038 23:  [ 6 ]
%e A078038 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 A078038           v   v    <--= no fall over these positions
%e A078038 01:  [ 1 1 1 1 1 1 ]
%e A078038 02:  [ 1 1 1 1 2 ]
%e A078038 03:  [ 1 1 1 3 ]
%e A078038 04:  [ 1 1 2 1 1 ]
%e A078038 05:  [ 1 1 2 2 ]
%e A078038 06:  [ 1 1 3 1 ]
%e A078038 07:  [ 1 1 4 ]
%e A078038 08:  [ 1 2 2 1 ]
%e A078038 09:  [ 1 2 3 ]
%e A078038 10:  [ 1 5 ]
%e A078038 11:  [ 2 1 1 1 1 ]
%e A078038 12:  [ 2 1 1 2 ]
%e A078038 13:  [ 2 1 2 1 ]
%e A078038 14:  [ 2 1 3 ]
%e A078038 15:  [ 2 2 2 ]
%e A078038 16:  [ 2 4 ]
%e A078038 17:  [ 3 1 1 1 ]
%e A078038 18:  [ 3 1 2 ]
%e A078038 19:  [ 3 3 ]
%e A078038 20:  [ 4 1 1 ]
%e A078038 21:  [ 4 2 ]
%e A078038 22:  [ 5 1 ]
%e A078038 23:  [ 6 ]
%e A078038 (End)
%p A078038 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 A078038 LinearRecurrence[{-1, 2, 1}, {1, -2, 4}, 40] (* _Jean-François Alcover_, Jan 08 2019 *)
%t A078038 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 A078038 Table[a[n],{n,0,40}]//Round (* _Herbert Kociemba_, Sep 17 2020 *)
%o A078038 (PARI) Vec((1-x)/(1+x-2*x^2-x^3)+O(x^99)) \\ _Charles R Greathouse IV_, Sep 25 2012
%Y A078038 Cf. A028495, A068911, A094790, A287381 (absolute values).
%K A078038 sign,easy
%O A078038 0,2
%A A078038 _N. J. A. Sloane_, Nov 17 2002