OFFSET
0,10
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-2,2,0,-2,2,-2,2,-2,2,-2,1).
FORMULA
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
G.f.: x^8*(1 - x^2)/((1 - x)^2*(1 - x^8)^2). - G. C. Greubel, Sep 13 2019
MAPLE
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
MATHEMATICA
CoefficientList[Series[x^8*(1-x^2)/((1-x)^2*(1-x^8)^2), {x, 0, 70}], x] (* G. C. Greubel, Sep 13 2019 *)
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 *)
PROG
(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
(Magma) [Floor(n/8)*Ceiling(n/8): n in [0..70]]; // G. C. Greubel, Sep 13 2019
(Sage) [floor(n/8)*ceil(n/8) for n in (0..70)] # G. C. Greubel, Sep 13 2019
(Python)
def A008838(n): return (m:=n>>3)*(m+bool(n&7)) # Chai Wah Wu, Jan 19 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved