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!)
A025599 Number of n-move knight paths on 8 X 8 board from given corner to any square. 1

%I #17 May 28 2015 06:12:50

%S 1,2,12,64,404,2352,14396,85608,517796,3100928,18678652,112130536,

%T 674473028,4052292096,24363059260,146416625608,880136072420,

%U 5289934135040,31796930379452,191117281480168,1148752620931652,6904721644495296,41502080416224764

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

%H Alois P. Heinz, <a href="/A025599/b025599.txt">Table of n, a(n) for n = 0..400</a>

%F G.f.: -(72*x^7+128*x^6-42*x^5-108*x^4-3*x^3+21*x^2+x-1) / (96*x^8 -16*x^7 -276*x^6 -42*x^5 +162*x^4 +29*x^3 -27*x^2 -3*x+1). - _Alois P. Heinz_, Jun 26 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, 2], [1, -2], [-1, 2],

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

%p end:

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

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Jun 26 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, 2}, {1, -2}, {-1, 2}, {-1, -2}, {2, 1}, {2, -1}, {-2, 1}, {-2, -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

%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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)