OFFSET
0,2
COMMENTS
a(n) represents the number of n-move routes of a fairy chess piece starting in a given corner square (m = 1, 3, 7 or 9) on a 3 X 3 chessboard. This fairy chess piece behaves like a bishop on the eight side and corner squares but on the center square the bishop flies into a rage and turns into a raging elephant.
In chaturanga, the old Indian version of chess, one of the pieces was called gaja, elephant in Sanskrit. The Arabs called the game shatranj and the elephant became el fil in Arabic. In Spain chess became chess as we know it today but surprisingly in Spanish a bishop isn't a Christian bishop but a Moorish elephant and it still goes by its original name of el alfil.
On a 3 X 3 chessboard there are 2^9 = 512 ways for an elephant to fly into a rage on the central square (off the center the piece behaves like a normal bishop). The elephant is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program and A180140. For the corner squares the 512 elephants lead to 46 different elephant sequences, see the overview of elephant sequences and the crossreferences.
REFERENCES
Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 74, 366, 1992.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Viswanathan Anand, The Indian Defense, Time, Jun 19 2008.
Johannes W. Meijer, The elephant sequences.
Vladimir Kruchinin, Composition of ordinary generating functions, arXiv:1009.2565 [math.CO], 2010.
Wikipedia, War Elephant.
Index entries for linear recurrences with constant coefficients, signature (3,1,-6).
FORMULA
G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).
a(n) = 3*a(n-1) + a(n-2) - 6*a(n-3) with a(0)=1, a(1)=2 and a(2)=6.
a(n) = ((6+10*A)*A^(-n-1) + (6+10*B)*B^(-n-1))/13 - 2^n with A = (-1+sqrt(13))/6 and B = (-1-sqrt(13))/6.
a(n) = b(n) - b(n-1) - b(n-2), where b(n) = Sum_{k=1..n} (Sum_{j=0..k} (binomial(j,n-3*k+2*j)*(-6)^(k-j)*binomial(k,j)*3^(3*k-n-j), n>0, b(0)=1, with a(0) = b(0), a(1) = b(1) - b(0). - Vladimir Kruchinin, Aug 20 2010
E.g.f.: 2*exp(x/2)*(13*cosh(sqrt(13)*x/2) + 3*sqrt(13)*sinh(sqrt(13)*x/2))/13 - cosh(2*x) - sinh(2*x). - Stefano Spezia, Feb 12 2023
MAPLE
nmax:=28; m:=1; A[1]:=[0, 0, 0, 0, 1, 0, 0, 0, 1]: A[2]:=[0, 0, 0, 1, 0, 1, 0, 0, 0]: A[3]:=[0, 0, 0, 0, 1, 0, 1, 0, 0]: A[4]:=[0, 1, 0, 0, 0, 0, 0, 1, 0]: A[5]:=[0, 0, 1, 0, 0, 0, 1, 1, 1]: A[6]:=[0, 1, 0, 0, 0, 0, 0, 1, 0]: A[7]:=[0, 0, 1, 0, 1, 0, 0, 0, 0]: A[8]:=[0, 0, 0, 1, 0, 1, 0, 0, 0]: A[9]:=[1, 0, 0, 0, 1, 0, 0, 0, 0]: A:=Matrix([A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[8], A[9]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m, k], k=1..9): od: seq(a(n), n=0..nmax);
MATHEMATICA
LinearRecurrence[{3, 1, -6}, {1, 2, 6}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2012 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -6, 1, 3]^n*[1; 2; 6])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
(Magma) [n le 3 select Factorial(n) else 3*Self(n-1) +Self(n-2) -6*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 08 2021
(Sage) [( (1-x-x^2)/((1-2*x)*(1-x-3*x^2)) ).series(x, n+1).list()[n] for n in (0..40)] # G. C. Greubel, Dec 08 2021
CROSSREFS
Cf. Elephant sequences corner squares [decimal value A[5]]: A040000 [0], A000027 [16], A000045 [1], A094373 [2], A000079 [3], A083329 [42], A027934 [11], A172481 [7], A006138 [69], A000325 [26], A045623 [19], A000129 [21], A095121 [170], A074878 [43], A059570 [15], A175654 [71, this sequence], A026597 [325], A097813 [58], A057711 [27], 2*A094723 [23; n>=-1], A002605 [85], A175660 [171], A123203 [186], A066373 [59], A015518 [341], A134401 [187], A093833 [343].
KEYWORD
easy,nonn
AUTHOR
Johannes W. Meijer, Aug 06 2010; edited Jun 21 2013
STATUS
approved