|
|
A215415
|
|
a(2*n) = n, a(4*n+1) = 2*n-1, a(4*n+3) = 2*n+3.
|
|
1
|
|
|
0, -1, 1, 3, 2, 1, 3, 5, 4, 3, 5, 7, 6, 5, 7, 9, 8, 7, 9, 11, 10, 9, 11, 13, 12, 11, 13, 15, 14, 13, 15, 17, 16, 15, 17, 19, 18, 17, 19, 21, 20, 19, 21, 23, 22, 21, 23, 25, 24, 23, 25, 27, 26, 25, 27, 29, 28, 27, 29, 31, 30, 29, 31, 33, 32, 31, 33, 35, 34, 33, 35, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
a(n) and higher order differences in further rows:
0, -1, 1, 3, 2, 1,
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.
By definition, all differences a(n+k)-a(n) are periodic sequences with period length 4. For k=1, 3 and 4 these are A134430, A021307 and A007395, for example.
|
|
LINKS
|
|
|
FORMULA
|
a(2*n) = n, a(2*n+1) = A097062(n+1).
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
|
|
|
STATUS
|
approved
|
|
|
|