The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A025598 Number of n-move king paths on 8 X 8 board from given corner to adjacent corner. 1

%I

%S 0,0,0,0,0,0,0,127,1568,17221,157710,1360107,11104632,87999275,

%T 681209386,5192306420,39117179936,292250754994,2169869100416,

%U 16036792568508,118115950230120,867736883991669,6362604049648708,46586411156710601,340735507632772936

%N Number of n-move king paths on 8 X 8 board from given corner to adjacent corner.

%H Alois P. Heinz, <a href="/A025598/b025598.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: -(267*x^9 +2097*x^8 +4104*x^7 -1898*x^6 -8970*x^5 -2100*x^4 +4314*x^3 +1932*x^2 -171*x-127) *x^7 / ((3*x-1) *(x+1) *(17*x^3+6*x^2-3*x-1) *(3*x^3+9*x^2+6*x-1) *(3*x^3-9*x^2-3*x+1) *(3*x^3-3*x-1) *(x^3+3*x^2-6*x+1)). - _Alois P. Heinz_, Jun 25 2012

%p b:= proc(n, i, j) option remember;

%p `if`(n<0 or i<0 or i>7 or j<0 or j>7, 0, `if`([n,i,j]=[0,0,7],

%p 1, add(b(n-1, i+r[1], j+r[2]), r=[[1, 1], [1, 0], [1, -1],

%p [0, 1], [0, -1], [-1, 1], [-1, 0], [-1, -1]])))

%p end:

%p a:= n-> b(n, 7, 7):

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Jun 25 2012

%t b[n_, i_, j_] := b[n, i, j] = If[n<0 || i<0 || i>7 || j<0 || j>7, 0, If[{n, i, j} == {0, 0, 7}, 1, Sum [b[n-1, i+r[[1]], j+r[[2]]], {r, {{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1,1}, {-1, 0}, {-1, -1}}}]]]; a[n_] := b[n, 7, 7]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, May 28 2015, after _Alois P. Heinz_ *)

%K nonn,easy

%O 0,8

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 16 05:10 EDT 2022. Contains 353693 sequences. (Running on oeis4.)