OFFSET
0,8
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..300
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1).
FORMULA
From R. J. Mathar, Apr 15 2010: (Start)
a(n) = +2*a(n-1) -a(n-2) +a(n-5) -2*a(n-6) +a(n-7) -a(n-10) +2*a(n-11) -a(n-12) +a(n-15) -2*a(n-16) +a(n-17).
G.f.: x^5*(x^2-x+1)*(x^6-x^3+1) / ((1-x)^3*(x^2+1)*(x^4+x^3+x^2+x+1)*(x^8-x^6+x^4-x^2+1) ). (End)
MATHEMATICA
Table[Floor[n(n-1)/20], {n, 0, 550}] (* G. C. Greubel, Sep 03 2015 *)
LinearRecurrence[{2, -1, 0, 0, 1, -2, 1, 0, 0, -1, 2, -1, 0, 0, 1, -2, 1}, {0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 12}, 80] (* Vincenzo Librandi, Sep 03 2015 *)
PROG
(PARI) a(n) = n*(n-1)\20; \\ Michel Marcus, Sep 03 2015
(Magma) [n*(n-1) div 20: n in [0..80]]; // Vincenzo Librandi, Sep 03 2015
(Magma) I:=[0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 12]; [n le 17 select I[n] else +2*Self(n-1) -Self(n-2) +Self(n-5) -2*Self(n-6) +Self(n-7) -Self(n-10) +2*Self(n-11) -Self(n-12) +Self(n-15) -2*Self(n-16) +Self(n-17): n in [1..70]]; // Vincenzo Librandi, Sep 03 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved