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”).

A229204
For k>0, a(3k+1) = k*(k-3), a(3k+2) = k*(k-1), a(3k+3) = k*(k-1)-1.
1
0, 0, 0, -2, 0, -1, -2, 2, 1, 0, 6, 5, 4, 12, 11, 10, 20, 19, 18, 30, 29, 28, 42, 41, 40, 56, 55, 54, 72, 71, 70, 90, 89, 88, 110, 109, 108, 132, 131, 130, 156, 155, 154, 182, 181, 180, 210, 209, 208, 240, 239, 238, 272, 271, 270, 306, 305, 304, 342, 341
OFFSET
1,4
COMMENTS
The first differences are 0, 0, -2, 2, -1, -1, 4, -1, -1, 6, -1, -1, 8, -1, -1, 10, ... .
FORMULA
From Colin Barker, Jan 12 2016: (Start)
a(n) = a(n-1)+2*a(n-3)-2*a(n-4)-a(n-6)+a(n-7) for n>7.
G.f.: -x^4*(1+x^2)*(2-2*x-x^2-x^3+x^4) / ((1-x)^3*(1+x+x^2)^2).
(End)
PROG
(Magma) &cat[IsZero(k) select [0, 0, 0] else [k*(k-3), k*(k-1), k*(k-1)-1]: k in [0..30]]; // Bruno Berselli, Sep 16 2013
(PARI) concat(vector(3), Vec(-x^4*(1+x^2)*(2-2*x-x^2-x^3+x^4)/((1-x)^3*(1+x+x^2)^2) + O(x^100))) \\ Colin Barker, Jan 12 2016
CROSSREFS
Sequence in context: A316716 A145462 A159934 * A067460 A159855 A128256
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Sep 16 2013
STATUS
approved