OFFSET
0,10
COMMENTS
This sequence consists of six 0's followed by triply repeated triangular numbers.
For a guide to related sequences, see A211422.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,2,-2,0,-1,1).
FORMULA
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
a(n) = floor(n/3)*( floor(n/3) - 1 )/2. - Luce ETIENNE, Jul 08 2014
G.f.: -x^6 / ((x-1)^3*(x^2+x+1)^2). - Colin Barker, Feb 17 2015
a(n) = Sum_{i=0..n-3} i*0^(i mod 3)/3. - Wesley Ivan Hurt, Apr 05 2015
MAPLE
MATHEMATICA
t[n_] := t[n] = Flatten[Table[-w + 3 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
c[n_] := Count[t[n], 0]
t = Table[c[n], {n, 0, 70}] (* A211534 *)
FindLinearRecurrence[t]
LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, 0, 0, 0, 0, 0, 1}, 70] (* Vincenzo Librandi, Apr 05 2015 *)
PROG
(PARI) concat([0, 0, 0, 0, 0, 0], Vec(-x^6/((x-1)^3*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, Feb 17 2015
(Magma) [Floor(n/3)*(Floor(n/3)-1)/2 : n in [0..100]]; // Wesley Ivan Hurt, Apr 05 2015
(Magma) [n le 7 select Floor(n/7) else Self(n-1)+2*Self(n-3)-2*Self(n-4)-Self(n-6)+ Self(n-7): n in [1..70]]; // Vincenzo Librandi, Apr 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 15 2012
STATUS
approved