OFFSET
1,4
COMMENTS
First differences of A056827. - R. J. Mathar, Nov 22 2008
a(n+2) is the graph radius of the n X n knight graph for n > 7. - Eric W. Weisstein, Nov 20 2019
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Graph Radius
Eric Weisstein's World of Mathematics, Knight Graph
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = floor(n/2) - floor(n/6).
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: x^2*(1+x^2)/((1+x)*(1-x)^2*(1+x+x^2)*(1-x+x^2)).
a(n+1) - a(n) = A120325(n+1). (End)
a(n) = a(n-1)+a(n-6)-a(n-7). - Wesley Ivan Hurt, Apr 26 2021
MATHEMATICA
a[n_] := Floor[n/2] - Floor[n/6]; Array[a, 80] (* Robert G. Wilson v Oct 29 2006 *)
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 1, 2, 2, 2, 2}, 80] (* G. C. Greubel, Aug 07 2019 *)
PROG
(PARI) my(x='x+O('x^80)); concat([0], Vec(x^2*(1+x^2)/((1-x)*(1-x^6)))) \\ G. C. Greubel, Aug 07 2019
(PARI) a(n) = floor(n/2) - floor(n/6); \\ Joerg Arndt, Nov 23 2019
(GAP) a:=[0, 1, 1, 2, 2, 2, 2];; for n in [8..80] do a[n]:=a[n-1]+a[n-6]-a[n-7]; od; a; # G. C. Greubel, Aug 07 2019
(Magma) [Floor(n/2) - Floor(n/6) : n in [1..100]]; // Wesley Ivan Hurt, Apr 26 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Oct 29 2006
STATUS
approved