OFFSET
0,4
COMMENTS
a(n) and higher order differences in further rows:
0, -1, 1, 3, 2, 1,
-1, 2, 2, -1, -1, -2, A134430(n).
3, 0, -3, 0, 3, 0,
-3, -3, 3, 3, -3, -3,
0, 6, 0, -6, 0, 6,
6, -6, -6, 6, 6, -6.
a(n) is the binomial transform of 0, -1, 3, -3, 0, 6, -12, 12, 0, -24, 48, -48, 0, 96..., essentially negated A134813.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
a(2*n) = n, a(2*n+1) = A097062(n+1).
a(3*n) =3*A004525(n).
a(n) = +2*a(n-1) -2*a(n-2) +2*a(n-3) -a(n-4).
G.f. -x*(1-3*x+x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Aug 11 2012
a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4. - Colin Barker, Oct 19 2015
MATHEMATICA
Flatten[Table[{2n, 2n - 1, 2n + 1, 2n + 3}, {n, 0, 19}]] (* Alonso del Arte, Aug 09 2012 *)
PROG
(PARI) a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4 \\ Colin Barker, Oct 19 2015
(PARI) concat(0, Vec(-x*(1-3*x+x^2)/((x^2+1)*(x-1)^2) + O(x^100))) \\ Colin Barker, Oct 19 2015
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Aug 09 2012
STATUS
approved