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.

A180038 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1 - 3*x)/(1 - 5*x - 2*x^2).

Original entry on oeis.org

1, 2, 12, 64, 344, 1848, 9928, 53336, 286536, 1539352, 8269832, 44427864, 238678984, 1282250648, 6888611208, 37007557336, 198815009096, 1068090160152, 5738080818952, 30826584415064, 165609083713224, 889698587396248
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in the central square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180028.
The sequence above corresponds to 28 red queen vectors, i.e., A[5] vector, with decimal values varying between 3 and 384. The corner and side squares lead for these vectors to A180037.

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else 5*Self(n-1)+2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=21; m:=5; A[5]:= [0,0,0,0,0,0,0,1,1]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): 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[{5,2},{1,2},50] (* Vincenzo Librandi, Nov 15 2011 *)

Formula

G.f.: (1-3*x)/(1 - 5*x - 2*x^2).
a(n) = 5*a(n-1) + 2*a(n-2) with a(0) = 1 and a(1) = 2.
a(n) = ((19*A-1)*A^(-n-1) + (19*B-1)*B^(-n-1))/33 with A = (-5+sqrt(33))/4 and B = (-5-sqrt(33))/4.