cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A232007 Maximal number of moves needed by a knight to reach every square from a fixed position on an n X n chessboard, or -1 if it is not possible to reach every square.

This page as a plain text file.
%I A232007 #54 Feb 16 2025 08:33:20
%S A232007 0,-1,-1,5,4,4,5,6,6,7,8,8,9,10,10,11,12,12,13,14,14,15,16,16,17,18,
%T A232007 18,19,20,20,21,22,22,23,24,24,25,26,26,27,28,28,29,30,30,31,32,32,33,
%U A232007 34,34,35,36,36,37,38,38,39,40,40,41,42,42,43,44,44,45,46,46
%N A232007 Maximal number of moves needed by a knight to reach every square from a fixed position on an n X n chessboard, or -1 if it is not possible to reach every square.
%C A232007 In other words, a(n) is the graph diameter of the n X n knight graph (or -1 if the graph is disconnected). - _Eric W. Weisstein_, Nov 20 2019
%H A232007 Colin Barker, <a href="/A232007/b232007.txt">Table of n, a(n) for n = 1..1000</a>
%H A232007 Marco Ripà, <a href="https://arxiv.org/abs/2311.00016">Metric spaces in chess and international chess pieces graph diameters</a>, arXiv:2311.00016 [math.HO], 2023. See pp. 11, 19.
%H A232007 Paul B. Slater, <a href="http://arxiv.org/abs/1609.08561">Formulas for Generalized Two-Qubit Separability Probabilities</a>, arXiv:1609.08561 [quant-ph], 2016.
%H A232007 Paul B. Slater, <a href="http://arxiv.org/abs/1504.04555">Hypergeometric/Difference-Equation-Based Separability Probability Formulas and Their Asymptotics for Generalized Two-Qubit States Endowed with Random Induced Measure</a>, arXiv preprint arXiv:1504.04555 [quant-ph], 2015.
%H A232007 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GraphDiameter.html">Graph Diameter</a>
%H A232007 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KnightGraph.html">Knight Graph</a>
%H A232007 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A232007 a(n) = ceiling(2n/3) for n > 4; see A004523. - _R. J. Mathar_, Nov 24 2013
%F A232007 From _Colin Barker_, Apr 26 2016: (Start)
%F A232007 a(n) = a(n-1)+a(n-3)-a(n-4) for n>8.
%F A232007 G.f.: -x^2*(1-6*x^2+5*x^5-2*x^6) / ((1-x)^2*(1+x+x^2)). (End)
%e A232007 For a classic 8 X 8 chessboard, a knight needs at most 6 moves to reach every square starting from a fixed position, so a(8) = 6.
%e A232007 For a 3 X 3 chessboard, it's impossible to reach the middle square starting from any other, so a(3) = -1.
%t A232007 Replace[Table[GraphDiameter[KnightTourGraph[n, n]], {n, 20}], Infinity -> -1] (* _Eric W. Weisstein_, Nov 20 2019 *)
%t A232007 Join[{0, -1, -1, 5}, Table[Ceiling[2 n/3], {n, 5, 20}]] (* _Eric W. Weisstein_, Nov 20 2019 *)
%t A232007 Join[{0, -1, -1, 5}, LinearRecurrence[{1, 0, 1, -1}, {4, 4, 5, 6}, 20]] (* _Eric W. Weisstein_, Nov 20 2019 *)
%t A232007 CoefficientList[Series[-1 - x + 5 x^2 + x^3 (4 + x^2 - 3 x^3)/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* _Eric W. Weisstein_, Nov 20 2019 *)
%o A232007 (PARI) concat(0, Vec(-x^2*(1-6*x^2+5*x^5-2*x^6)/((1-x)^2*(1+x+x^2)) + O(x^100))) \\ _Colin Barker_, Apr 26 2016
%Y A232007 Cf. A004523.
%K A232007 sign,easy
%O A232007 1,4
%A A232007 _Mateusz Szymański_, Nov 16 2013
%E A232007 More terms from _Vaclav Kotesovec_, Oct 21 2014