login
a(n) = number of knight's move paths of minimal length n steps, from origin (0,0) at center of an infinite open chessboard to square (0,0) for n=0; square (2,-1) for n=1; and square (2n-3, (n+1)mod 2) for n>=2.
6

%I #60 Sep 08 2022 08:46:08

%S 1,1,2,6,28,100,330,1050,3024,8736,23220,62700,158004,406692,986986,

%T 2452450,5788640,14002560,32357052,76640148,174174520,405623400,

%U 909582212,2089064516,4633556448,10519464000,23120533800,51977741400,113365499940,252725219460,547593359850,1211884139250,2610998927040,5741708459520,12309472580460,26917328938500,57457069777800,125016198060600,265832233972140,575824335603660,1220234181784800

%N a(n) = number of knight's move paths of minimal length n steps, from origin (0,0) at center of an infinite open chessboard to square (0,0) for n=0; square (2,-1) for n=1; and square (2n-3, (n+1)mod 2) for n>=2.

%C The squares concerned constitute an infinite, locally fully concertinaed knight's path from the origin, which hugs the axis y=0 and is minimal to each square.

%D Fred Lunnon, Knights in Daze, to appear.

%H Fred Lunnon, <a href="/A242591/a242591.a.txt">Revised tables & functions for knight's path distance and count (MAGMA code)</a>

%F For n>=2, a(n) = binomial(n,floor(n/2)-1)/6 *

%F ( (n^2-2*n+6)*(n^2+8)/(n+4) if n even, (n-1)*(n^2-2*n+15) if n odd ).

%F G.f.: (-10 + 10*x + 127*x^2 - 111*x^3 - 576*x^4 + 410*x^5 + 1072*x^6 - 528*x^7 - 624*x^8 + 144*x^9 + q*(10 + 10*x - 7*x^2 - 3*x^3 + x^4 + x^5))/(q*x^4), where q = sqrt((1 - 2*x)^7*(1 + 2*x)^5). - _Benedict W. J. Irwin_, Oct 20 2016

%e For n=0 there is a(0)=1 path from (0,0) to (0,0) with 0 step.

%e For n=1 there is a(1)=1 path from (0,0) to (2,-1) with 1 step.

%e For n=2 there are a(2)=2 paths from (0,0) to (1,1) with 2 steps:

%e (0,0) -> (2,-1) -> (1,1) and (0,0) -> (-1,2) -> (1,1).

%e For n=3 there are a(3)=6 paths from (0,0) to (3,0) with 3 steps:

%e (0,0)(2,-1)(1,1)(3,0); (0,0)(2,1)(1,-1)(3,0); (0,0)(2,-1)(4,-2)(3,0);

%e (0,0)(2,1)(4,2)(3,0); (0,0)(-1,-2)(1,-1)(3,0); (0,0)(-1,2)(1,1)(3,0).

%p A242511 := proc(n)

%p local a;

%p if n <=1 then

%p return 1;

%p end if ;

%p a := binomial(n,floor(n/2)-1)/6 ;

%p if type(n,'even') then

%p a*(n^2-2*n+6)*(8+n^2)/(n+4) ;

%p else

%p a*(n-1)*(n^2-2*n+15) ;

%p end if ;

%p end proc: # _R. J. Mathar_, May 17 2014

%t q := (1 - 2 x)^(7/2) (1 + 2 x)^(5/2); CoefficientList[Series[(-10 + 10 x + 127 x^2 - 111 x^3 - 576 x^4 + 410 x^5 + 1072 x^6 - 528 x^7 - 624 x^8 + 144 x^9 + q (10 + 10 x - 7 x^2 - 3 x^3 + x^4 + x^5))/(q*x^4), {x, 0, 20}],x] (* _Benedict W. J. Irwin_, Oct 20 2016 *)

%o (Magma)

%o [ Max(1, Binomial(d, d div 2 - 1)/6 * // axis-hugging path

%o ( /*if*/ IsEven(d) select (d^2-2*d+6)*(d^2+8)/(d+4)

%o else (d-1)*(d^2-2*d+15) /*end if*/ )) : d in [0..20] ];

%Y Cf. A242512, A242513, A242514, A183043, A242591.

%K easy,nonn,walk

%O 0,3

%A _Fred Lunnon_, May 16 2014 and May 18 2014