login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A213029
a(n) = floor(n/2)^2 - floor(n/3)^2.
1
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, 105, 88, 115, 115, 125, 125, 156, 135, 168, 168, 180, 180, 217, 192, 231, 231, 245, 245, 288, 259, 304, 304, 320, 320, 369, 336, 387, 387, 405, 405, 460, 423
OFFSET
0,5
LINKS
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
Sequence in context: A245144 A279021 A339555 * A348843 A290208 A171710
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2012
EXTENSIONS
Formula corrected by Vincenzo Librandi, Aug 02 2013
STATUS
approved