A180037 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1+x)/(1-5*x-2*x^2).
1, 6, 32, 172, 924, 4964, 26668, 143268, 769676, 4134916, 22213932, 119339492, 641125324, 3444305604, 18503778668, 99407504548, 534045080076, 2869040409476, 15413292207532, 82804541856612, 444849293698124
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- M. Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, J. Int. Seq. 18 (2015) # 15.4.7.
- Index entries for linear recurrences with constant coefficients, signature (5, 2).
Programs
-
Magma
I:=[1,6]; [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:=1; 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,6},50] (* Vincenzo Librandi, Nov 15 2011 *)
Formula
G.f.: (1+x)/(1-5*x-2*x^2).
a(n) = 5*a(n-1) + 2*a(n-2) with a(0) = 1 and a(1) = 6.
a(n) = ((7-A)*A^(-n-1)+(7-B)*B^(-n-1))/33 with A = (-5+sqrt(33))/4 and B = (-5-sqrt(33))/4.
Comments