%I #23 Sep 28 2024 14:26:50
%S 0,0,1,0,3,3,5,5,12,7,16,16,20,20,33,24,39,39,45,45,64,51,72,72,80,80,
%T 105,88,115,115,125,125,156,135,168,168,180,180,217,192,231,231,245,
%U 245,288,259,304,304,320,320,369,336,387,387,405,405,460,423
%N a(n) = floor(n/2)^2 - floor(n/3)^2.
%H Vincenzo Librandi, <a href="/A213029/b213029.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (-1,1,3,2,-2,-3,-1,1,1).
%F a(n) = -a(n-1)+a(n-2)+3*a(n-3)+2*a(n-4)-2*a(n-5)-3*a(n-6)-a(n-7)+a(n-8)+a(n-9).
%F G.f.: (x^2 + x^3 + 2*x^4 + 3*x^5 + 3*x^6)/(1 + x - x^2 - 3 x^3 - 2*x^4 + 2*x^5 + 3*x^6 + x^7 - x^8 - x^9).
%t a[n_] := Floor[n/2]^2 - Floor[n/3]^2
%t Table[a[n], {n, 0, 60}] (* A213029 *)
%t LinearRecurrence[{-1, 1, 3, 2, -2, -3, -1, 1, 1}, {0, 0, 1, 0, 3, 3, 5, 5, 12}, 60]
%t CoefficientList[Series[(x^2 + x^3 + 2 x^4 + 3 x^5 + 3 x^6) / (1 + x - x^2 - 3 x^3 - 2 x^4 + 2 x^5 + 3 x^6 + x^7 - x^8 - x^9), {x, 0, 80}], x] (* _Vincenzo Librandi_, Aug 02 2013 *)
%o (Magma) I:=[0,0,1,0,3,3,5,5,12]; [n le 9 select I[n] else -Self(n-1)+Self(n-2)+3*Self(n-3)+2*Self(n-4)-2*Self(n-5)-3*Self(n-6)-Self(n-7)+Self(n-8)+Self(n-9): n in [1..60]]; // _Vincenzo Librandi_, Aug 02 2013
%K nonn,easy
%O 0,5
%A _Clark Kimberling_, Jun 05 2012
%E Formula corrected by _Vincenzo Librandi_, Aug 02 2013