OFFSET
0,3
COMMENTS
[x] denotes floor(x), the largest integer <= x. E.g., [-1/2] = -1.
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.
REFERENCES
Fred Lunnon, Knights in Daze, to appear.
LINKS
FORMULA
For n>=2, a(n) = binomial(n,[n/2]-1)/2 *
( (n^3-n^2+30n-40)/(n+4) if n even, n(n^2+2n+33)/(n+5) if n odd ).
EXAMPLE
See also examples for A242511.
For n=3, there are a(3)=9 minimal paths of 3 steps from (0,0) to (3,2).
PROG
(Magma)
[ Max(1, Binomial(d, d div 2 - 1)/2 * // diagonal-hugging path
( /*if*/ IsEven(d) select (d^3-d^2+30*d-40)/(d+4)
else d*(d^2+2*d+33)/(d+5) /*end if*/ )) : d in [0..20] ];
(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
CROSSREFS
KEYWORD
easy,nonn,walk
AUTHOR
Fred Lunnon, May 16 2014 and May 18 2014
STATUS
approved