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

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

%S 1,1,2,9,32,85,240,588,1512,3564,8700,19965,47124,105963,244244,

%T 540540,1224080,2674984,5974956,12924522,28553200,61250490,134104432,

%U 285689624,620826672,1314933000,2839363800,5984393805,12852021420,26973910215,57655813500,120569654700,256649540640,535009931280,1134692142540,2358818719950,4986548028000,10340761857030,21796919253120,45102668144040,94821703158000

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

%C [x] denotes floor(x), the largest integer <= x. E.g., [-1/2] = -1.

%C The squares concerned constitute an infinite, locally fully concertinaed knight path from the origin, which hugs the diagonal x=y 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,[n/2]-1)/2 *

%F ( (n^3-n^2+30n-40)/(n+4) if n even, n(n^2+2n+33)/(n+5) if n odd ).

%e See also examples for A242511.

%e For n=3, there are a(3)=9 minimal paths of 3 steps from (0,0) to (3,2).

%o (Magma)

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

%o ( /*if*/ IsEven(d) select (d^3-d^2+30*d-40)/(d+4)

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

%o (PARI) a(n) = max(1, binomial(n, (n\2 - 1))/2 * if (n%2, n*(n^2+2*n+33)/(n+5), (n^3-n^2+30*n-40)/(n+4))); \\ _Michel Marcus_, May 17 2014

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

%K easy,nonn,walk

%O 0,3

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