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.
%I A179602 #8 Nov 23 2018 16:27:31 %S A179602 1,5,22,101,457,2078,9433,42845,194566,883613,4012801,18223694, %T A179602 82760689,375847925,1706868598,7751541269,35202703993,159868900862, %U A179602 726025630537,3297159197645,14973657006694,68001085403597,308818855257649 %N A179602 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + 2*x)/(1 - 3*x - 7*x^2). %C A179602 The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 or 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596. %C A179602 The sequence above corresponds to 24 red king vectors, i.e., A[5] vectors, with decimal values 95, 119, 125, 215, 221, 245, 287, 311, 317, 347, 350, 371, 374, 377, 380, 407, 413, 437, 467, 470, 473, 476, 497 and 500. These vectors lead for the corner squares to A015524 and for the central square to A179603. %H A179602 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3, 7). %F A179602 G.f.: (1+2*x)/(1 - 3*x - 7*x^2). %F A179602 a(n) = 3*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 5. %F A179602 a(n) = ((37+4*37^(1/2))*A^(-n-1) + (37-4*37^(1/2))*B^(-n-1))/259 with A = (-3+sqrt(37))/14 and B = (-3-sqrt(37))/14. %p A179602 with(LinearAlgebra): nmax:=22; m:=2; A[1]:= [0,1,0,1,1,0,0,0,0]: A[2]:= [1,0,1,1,1,1,0,0,0]: A[3]:= [0,1,0,0,1,1,0,0,0]: A[4]:=[1,1,0,0,1,0,1,1,0]: A[5]:= [1,1,1,0,1,0,0,1,1]: A[6]:= [0,1,1,0,1,0,0,1,1]: A[7]:= [0,0,0,1,1,0,0,1,0]: A[8]:= [0,0,0,1,1,1,1,0,1]: A[9]:= [0,0,0,0,1,1,0,1,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); %t A179602 CoefficientList[Series[(1+2x)/(1-3x-7x^2),{x,0,40}],x] (* or *) LinearRecurrence[ {3,7},{1,5},40] (* _Harvey P. Dale_, Mar 28 2013 *) %Y A179602 Cf. A126473 (side squares). %K A179602 easy,nonn %O A179602 0,2 %A A179602 _Johannes W. Meijer_, Jul 28 2010