OFFSET
0,3
COMMENTS
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.
REFERENCES
Fred Lunnon, Knights in Daze, to appear.
LINKS
FORMULA
For n>=2, a(n) = binomial(n,floor(n/2)-1)/6 *
( (n^2-2*n+6)*(n^2+8)/(n+4) if n even, (n-1)*(n^2-2*n+15) if n odd ).
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
EXAMPLE
For n=0 there is a(0)=1 path from (0,0) to (0,0) with 0 step.
For n=1 there is a(1)=1 path from (0,0) to (2,-1) with 1 step.
For n=2 there are a(2)=2 paths from (0,0) to (1,1) with 2 steps:
(0,0) -> (2,-1) -> (1,1) and (0,0) -> (-1,2) -> (1,1).
For n=3 there are a(3)=6 paths from (0,0) to (3,0) with 3 steps:
(0,0)(2,-1)(1,1)(3,0); (0,0)(2,1)(1,-1)(3,0); (0,0)(2,-1)(4,-2)(3,0);
(0,0)(2,1)(4,2)(3,0); (0,0)(-1,-2)(1,-1)(3,0); (0,0)(-1,2)(1,1)(3,0).
MAPLE
A242511 := proc(n)
local a;
if n <=1 then
return 1;
end if ;
a := binomial(n, floor(n/2)-1)/6 ;
if type(n, 'even') then
a*(n^2-2*n+6)*(8+n^2)/(n+4) ;
else
a*(n-1)*(n^2-2*n+15) ;
end if ;
end proc: # R. J. Mathar, May 17 2014
MATHEMATICA
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 *)
PROG
(Magma)
[ Max(1, Binomial(d, d div 2 - 1)/6 * // axis-hugging path
( /*if*/ IsEven(d) select (d^2-2*d+6)*(d^2+8)/(d+4)
else (d-1)*(d^2-2*d+15) /*end if*/ )) : d in [0..20] ];
CROSSREFS
KEYWORD
easy,nonn,walk
AUTHOR
Fred Lunnon, May 16 2014 and May 18 2014
STATUS
approved