login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Maximal length of rook tour on an n X n+1 board.
5

%I #20 Apr 20 2023 04:23:37

%S 2,8,24,54,104,174,270,396,558,756,996,1282,1620,2010,2458,2968,3546,

%T 4192,4912,5710,6592,7558,8614,9764,11014,12364,13820,15386,17068,

%U 18866,20786,22832,25010,27320,29768,32358,35096,37982,41022,44220,47582

%N Maximal length of rook tour on an n X n+1 board.

%D M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.

%H Vincenzo Librandi, <a href="/A152132/b152132.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1,1,-3,3,-1).

%F G.f.: -2*x*(-1-x-2*x^3-2*x^4-3*x^2+x^5)/(1+x)/(x^2+1)/(x-1)^4.

%F a(n) = 3*a(n-1) -3*a(n-2) +a(n-3) +a(n-4) -3*a(n-5) +3*a(n-6) -a(n-7).

%F a(n) = 2*n^3/3+n^2-7*n/6+3/4-(-1)^n/4-A087960(n)/2.

%p # Figure 43 of the Gardner book:

%p C := proc(n,m)

%p if type(m,even) and type(n,even) then

%p 2 ;

%p elif type(m,odd) and type(n,odd) then

%p 1 ;

%p elif type(m,even) and type(n,odd) and type(floor(n/2),even) then

%p 3/2 ;

%p elif type(m,even) and type(n,odd) and type(floor(n/2),odd) then

%p 1/2 ;

%p elif type(m,odd) and type(n,even) and type(floor(n/2),even) then

%p 0 ;

%p elif type(m,odd) and type(n,even) and type(floor(n/2),odd) then

%p 1 ;

%p fi;

%p end:

%p # formula for n X m boards, from the Gardner book:

%p T := proc(n,m)

%p n*(3*m^2+n^2-10)/6+C(n,m) ;

%p end:

%p for n from 1 to 24 do

%p m := n+3 ; # third diagonal here, for example

%p printf("%d,",T(n,m)) ;

%p od:

%t CoefficientList[Series[-2 * (-1 - x - 2*x^3 - 2*x^4 - 3*x^2 + x^5)/(1 + x)/(x^2 + 1)/(x - 1)^4, {x, 0, 40}], x] (* _Vincenzo Librandi_, Dec 14 2012 *)

%o (Magma) I:=[2, 8, 24, 54, 104, 174, 270]; [n le 7 select I[n] else 3*Self(n-1) - 3*Self(n-2) + Self(n-3) + Self(n-4) - 3*Self(n-5) + 3*Self(n-6)- Self(n-7): n in [1..50]]; // _Vincenzo Librandi_, Dec 14 2012

%Y Cf. A006071, A087960, A152133, A152134, A152135.

%K nonn,easy

%O 1,1

%A _R. J. Mathar_, Mar 22 2009

%E More terms from _R. J. Mathar_, Sep 22 2009