%I #28 Sep 08 2022 08:45:28
%S 0,1,1,2,2,2,2,3,3,4,4,4,4,5,5,6,6,6,6,7,7,8,8,8,8,9,9,10,10,10,10,11,
%T 11,12,12,12,12,13,13,14,14,14,14,15,15,16,16,16,16,17,17,18,18,18,18,
%U 19,19,20,20,20,20,21,21,22,22,22,22,23,23,24,24,24,24,25,25,26,26,26
%N Number of numbers congruent to 2 or 4 mod 6 and <= n.
%C First differences of A056827. - _R. J. Mathar_, Nov 22 2008
%C a(n+2) is the graph radius of the n X n knight graph for n > 7. - _Eric W. Weisstein_, Nov 20 2019
%H G. C. Greubel, <a href="/A123919/b123919.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphRadius.html">Graph Radius</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KnightGraph.html">Knight Graph</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,1,-1).
%F a(n) = floor(n/2) - floor(n/6).
%F From _R. J. Mathar_, Nov 22 2008: (Start)
%F G.f.: x^2*(1+x^2)/((1+x)*(1-x)^2*(1+x+x^2)*(1-x+x^2)).
%F a(n+1) - a(n) = A120325(n+1). (End)
%F a(n) = A004526(n) - A152467(n). - _Omar E. Pol_, Nov 25 2019
%F a(n) = a(n-1)+a(n-6)-a(n-7). - _Wesley Ivan Hurt_, Apr 26 2021
%t a[n_] := Floor[n/2] - Floor[n/6]; Array[a, 80] (* _Robert G. Wilson v_ Oct 29 2006 *)
%t LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 1, 2, 2, 2, 2}, 80] (* _G. C. Greubel_, Aug 07 2019 *)
%o (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
%o (PARI) a(n) = floor(n/2) - floor(n/6); \\ _Joerg Arndt_, Nov 23 2019
%o (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
%o (Magma) [Floor(n/2) - Floor(n/6) : n in [1..100]]; // _Wesley Ivan Hurt_, Apr 26 2021
%Y Cf. A047235, A056827, A120325, A004526, A152467.
%K easy,nonn
%O 1,4
%A _Giovanni Teofilatto_, Oct 29 2006
|