%I #26 Sep 08 2022 08:46:02
%S 0,0,0,0,0,0,1,1,1,3,3,3,6,6,6,10,10,10,15,15,15,21,21,21,28,28,28,36,
%T 36,36,45,45,45,55,55,55,66,66,66,78,78,78,91,91,91,105,105,105,120,
%U 120,120,136,136,136,153,153,153,171,171,171,190,190,190,210
%N Number of ordered triples (w,x,y) with all terms in {1,...,n} and w = 3x + 3y.
%C This sequence consists of six 0's followed by triply repeated triangular numbers.
%C For a guide to related sequences, see A211422.
%H Colin Barker, <a href="/A211534/b211534.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,2,-2,0,-1,1).
%F a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
%F a(n) = floor(n/3)*( floor(n/3) - 1 )/2. - _Luce ETIENNE_, Jul 08 2014
%F G.f.: -x^6 / ((x-1)^3*(x^2+x+1)^2). - _Colin Barker_, Feb 17 2015
%F a(n) = Sum_{i=0..n-3} i*0^(i mod 3)/3. - _Wesley Ivan Hurt_, Apr 05 2015
%p A211534:=n->floor(n/3)*(floor(n/3)-1)/2: seq(A211534(n), n=0..100); # _Wesley Ivan Hurt_, Apr 05 2015
%t t[n_] := t[n] = Flatten[Table[-w + 3 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
%t c[n_] := Count[t[n], 0]
%t t = Table[c[n], {n, 0, 70}] (* A211534 *)
%t FindLinearRecurrence[t]
%t LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, 0, 0, 0, 0, 0, 1}, 70] (* _Vincenzo Librandi_, Apr 05 2015 *)
%o (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
%o (Magma) [Floor(n/3)*(Floor(n/3)-1)/2 : n in [0..100]]; // _Wesley Ivan Hurt_, Apr 05 2015
%o (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
%Y Cf. A211422, A008805 (w = 2x + 2y and doubly repeated triangular numbers).
%K nonn,easy
%O 0,10
%A _Clark Kimberling_, Apr 15 2012
|