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!)
A025606 Number of n-move queen paths on 8x8 board from given corner to adjacent corner. 1

%I #17 Oct 03 2021 16:52:40

%S 0,1,8,163,3398,76753,1751700,40139295,920426818,21110069229,

%T 484177665424,11105105040891,254707005772222,5841966668784265,

%U 133991488702577676,3073231857864304087,70487714816049472186,1616707794524130044965,37080845818916250489864

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

%H Alois P. Heinz, <a href="/A025606/b025606.txt">Table of n, a(n) for n = 0..736</a>

%F G.f.: -(602112*x^12 -576768*x^11 -530368*x^10 +580832*x^9 +116752*x^8 -198176*x^7 +8788*x^6 +26462*x^5 -4839*x^4 -956*x^3 +354*x^2 -34*x+1) *(3*x-1)^2 *x / ((112896*x^9 -170880*x^8 +29184*x^7 +55636*x^6 -26128*x^5 +79*x^4 +2120*x^3 -482*x^2 +40*x-1) *(1152*x^7 -36*x^6 -816*x^5 +49*x^4 +152*x^3 -14*x^2 -8*x+1)). - _Alois P. Heinz_, Jun 28 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},

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

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

%p [-1, 0]]), t=1..7)))

%p end:

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

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

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

%K nonn,easy

%O 0,3

%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 March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)