OFFSET
0,4
COMMENTS
Based on A129819 (the first with 0 0).
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-3,4,-3,2,-1).
FORMULA
G.f.: (-x*(1 - 2*x + x^2 - x^3))/(1 - x + x^2 - x^3)^2. - Georg Fischer, May 05 2021
MAPLE
seq(coeff(series( (-x*(1 - 2*x + x^2 - x^3))/(1 - x + x^2 - x^3)^2, x, n+1), x, n), n = 0..40); # Georg Fischer, May 05 2021
# Alternative:
a:= n-> (k-> [k, -1, k, 2*k+2][1+r])(iquo(n, 4, 'r')):
seq(a(n), n=0..92); # Alois P. Heinz, Oct 22 2025
MATHEMATICA
Flatten[Table[{n, -1, n, 2n+2}, {n, 0, 30}]] (* Harvey P. Dale, Nov 15 2011 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Aug 13 2007
STATUS
approved
