OFFSET
3,1
COMMENTS
Colin Barker's conjectures confirmed using first Mathematica program. - Ray Chandler, Jan 14 2024
LINKS
Ray Chandler, Table of n, a(n) for n = 3..1000
Eric Weisstein's World of Mathematics, Graph Circumference
Eric Weisstein's World of Mathematics, Knight Graph
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
From Colin Barker, Oct 07 2014: (Start)
a(n) = (-1+(-1)^n+2*n^2)/2 for n>4.
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>8.
G.f.: -2*x^3*(x^5-2*x^4+2*x^3-2*x^2-x+4) / ((x-1)^3*(x+1)).
(End)
MATHEMATICA
Table[Piecewise[{{14, n == 4}, {n^2, Mod[n, 2] == 0}, {n^2 - 1, Mod[n, 2] == 1}}], {n, 3, 50}]
CoefficientList[Series[-2x^3(x^5-2x^4+2x^3-2x^2-x+4)/((x-1)^3(x+1)), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, 0, -2, 1}, {8, 14, 24, 36, 48, 64}, 50] (* Harvey P. Dale, Jan 05 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Oct 06 2014
STATUS
approved