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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025595 Number of n-move king paths on 8x8 board from given corner to any square. 1

%I #25 Feb 24 2016 14:56:18

%S 1,3,18,105,684,4550,31340,219555,1559835,11177190,80573373,583082082,

%T 4230475092,30745373256,223692489189,1628685532071,11863934648190,

%U 86447927584521,630040117048380,4592393936655066,33477073967039868,244050825770095095,1779217416632500479

%N Number of n-move king paths on 8x8 board from given corner to any square.

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

%H A. Bostan, <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.410.1160&amp;rep=rep1&amp;type=pdf">Computer Algebra for Lattice Path Combinatorics</a>, Seminaire de Combinatoire Ph. Flajolet, March 28 2013.

%F G.f.: -(48*x^9 +120*x^8 -126*x^7 -457*x^6 -175*x^5 +162*x^4 +75*x^3 -18*x^2 -6*x+1) / ((3*x-1) *(3*x^3-3*x-1) *(3*x^3-9*x^2-3*x+1) *(3*x^3+9*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=0,

%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, 0, 0):

%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 == 0, 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, 0, 0]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, May 28 2015, after _Alois P. Heinz_ *)

%K nonn,easy

%O 0,2

%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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)