OFFSET
0,5
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,1,3,2,-2,-3,-1,1,1).
FORMULA
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).
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).
MATHEMATICA
a[n_] := Floor[n/2]^2 - Floor[n/3]^2
Table[a[n], {n, 0, 60}] (* A213029 *)
LinearRecurrence[{-1, 1, 3, 2, -2, -3, -1, 1, 1}, {0, 0, 1, 0, 3, 3, 5, 5, 12}, 60]
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2012
EXTENSIONS
Formula corrected by Vincenzo Librandi, Aug 02 2013
STATUS
approved