Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
a(n) = floor(n/8)*ceiling(n/8).
1

%I #22 Jan 19 2023 11:03:44

%S 0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,4,6,6,6,6,6,6,6,9,12,12,12,12,12,12,

%T 12,16,20,20,20,20,20,20,20,25,30,30,30,30,30,30,30,36,42,42,42,42,42,

%U 42,42,49,56,56,56,56,56,56,56,64,72,72,72,72,72,72

%N a(n) = floor(n/8)*ceiling(n/8).

%H G. C. Greubel, <a href="/A008838/b008838.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_16">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-2,2,-2,2,0,-2,2,-2,2,-2,2,-2,1).

%F a(n) = +2 a(n-1) -2 a(n-2) +2 a(n-3) -2 a(n-4) +2 a(n-5) -2 a(n-6) +2 a(n-7) -2 a(n-9) +2 a(n-10) -2 a(n-11) +2 a(n-12) -2 a(n-13) +2 a(n-14) -2 a(n-15) +a(n-16). - _R. J. Mathar_, Mar 11 2012

%F G.f.: x^8*(1 - x^2)/((1 - x)^2*(1 - x^8)^2). - _G. C. Greubel_, Sep 13 2019

%p seq(coeff(series(x^8*(1-x^2)/((1-x)^2*(1-x^8)^2), x, n+1), x, n), n = 0 .. 70); # _G. C. Greubel_, Sep 13 2019

%t CoefficientList[Series[x^8*(1-x^2)/((1-x)^2*(1-x^8)^2), {x,0,70}], x] (* _G. C. Greubel_, Sep 13 2019 *)

%t Floor[#]Ceiling[#]&/@(Range[0,80]/8) (* or *) LinearRecurrence[{2,-2,2,-2,2,-2,2,0,-2,2,-2,2,-2,2,-2,1},{0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2},80] (* _Harvey P. Dale_, Nov 11 2019 *)

%o (PARI) my(x='x+O('x^70)); concat(vector(8), Vec(x^8*(1-x^2)/((1-x)^2*(1-x^8)^2))) \\ _G. C. Greubel_, Sep 13 2019

%o (Magma) [Floor(n/8)*Ceiling(n/8): n in [0..70]]; // _G. C. Greubel_, Sep 13 2019

%o (Sage) [floor(n/8)*ceil(n/8) for n in (0..70)] # _G. C. Greubel_, Sep 13 2019

%o (Python)

%o def A008838(n): return (m:=n>>3)*(m+bool(n&7)) # _Chai Wah Wu_, Jan 19 2023

%K nonn

%O 0,10

%A _N. J. A. Sloane_