Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Dec 25 2017 04:09:39
%S 0,16,256,1744,6912,21744,55296,126016,256000,487600,864000,1467216,
%T 2370816,3716944,5619712,8306944,11943936,16875216,23328000,31800400,
%U 42592000,56397616,73598976,95137344,121485312,153887344,192914176,240177616,296352000,363488400
%N Detour index of the n X n grid graph.
%C Also, the maximum detour index of any bipartite graph on n^2 nodes. - _Andrew Howroyd_, Dec 20 2017
%H Andrew Howroyd, <a href="/A296779/b296779.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DetourIndex.html">Detour Index</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GridGraph.html">Grid Graph</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (2,4,-10,-5,20,0,-20,5,10,-4,-2,1).
%F a(2n-1) = 32*n^3*(n-1)^3, a(2n) = 4*n^2*(8*n^4 - 5*n^2 + 1). - _Andrew Howroyd_, Dec 20 2017
%F From _Colin Barker_, Dec 21 2017: (Start)
%F G.f.: 16*x^2*(1 + 14*x + 73*x^2 + 160*x^3 + 224*x^4 + 160*x^5 + 73*x^6 + 14*x^7 + x^8) / ((1 - x)^7*(1 + x)^5).
%F a(n) = 2*a(n-1) + 4*a(n-2) - 10*a(n-3) - 5*a(n-4) + 20*a(n-5) - 20*a(n-7) + 5*a(n-8) + 10*a(n-9) - 4*a(n-10) - 2*a(n-11) + a(n-12) for n>12.
%F (End)
%F a(n) = A296819(n^2). - _Andrew Howroyd_, Dec 23 2017
%t a[n_] := If[OddQ[n], (1/2)*(n-1)^3*(n+1)^3, (1/4)*n^2*(2*n^4 - 5*n^2 + 4)]; Array[a, 30] (* _Jean-François Alcover_, Dec 21 2017, after _Andrew Howroyd_ *)
%t LinearRecurrence[{2, 4, -10, -5, 20, 0, -20, 5, 10, -4, -2, 1}, {0, 16, 256, 1744, 6912, 21744, 55296, 126016, 256000, 487600, 864000, 1467216}, 30] (* _Eric W. Weisstein_, Dec 21 2017 *)
%t CoefficientList[Series[16 x (1 + 14 x + 73 x^2 + 160 x^3 + 224 x^4 + 160 x^5 + 73 x^6 + 14 x^7 + x^8)/((1 - x)^7 (1 + x)^5), {x, 0, 20}], x] (* _Eric W. Weisstein_, Dec 21 2017 *)
%o (PARI) a(n)=((n^2)*(n^2-1)^2 - if(n%2, (n+1)^2*(n-1)^2, n^2*(n^2/2-1)))/2; \\ _Andrew Howroyd_, Dec 20 2017
%o (PARI) concat(0, Vec(16*x^2*(1 + 14*x + 73*x^2 + 160*x^3 + 224*x^4 + 160*x^5 + 73*x^6 + 14*x^7 + x^8) / ((1 - x)^7*(1 + x)^5) + O(x^40))) \\ _Colin Barker_, Dec 21 2017
%Y Cf. A296780, A296781, A296784, A296819.
%K nonn,easy
%O 1,2
%A _Eric W. Weisstein_, Dec 20 2017
%E Terms a(8) and beyond from _Andrew Howroyd_, Dec 20 2017