%I #19 Oct 19 2015 05:00:12
%S 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,
%T 13,15,17,16,15,17,19,18,17,19,21,20,19,21,23,22,21,23,25,24,23,25,27,
%U 26,25,27,29,28,27,29,31,30,29,31,33,32,31,33,35,34,33,35,37
%N a(2*n) = n, a(4*n+1) = 2*n-1, a(4*n+3) = 2*n+3.
%C a(n) and higher order differences in further rows:
%C 0, -1, 1, 3, 2, 1,
%C -1, 2, 2, -1, -1, -2, A134430(n).
%C 3, 0, -3, 0, 3, 0,
%C -3, -3, 3, 3, -3, -3,
%C 0, 6, 0, -6, 0, 6,
%C 6, -6, -6, 6, 6, -6.
%C a(n) is the binomial transform of 0, -1, 3, -3, 0, 6, -12, 12, 0, -24, 48, -48, 0, 96..., essentially negated A134813.
%C 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.
%H Colin Barker, <a href="/A215415/b215415.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F a(2*n) = n, a(2*n+1) = A097062(n+1).
%F a(n) = (A214297(n+1) - A214297(n-1))/2.
%F a(3*n) =3*A004525(n).
%F a(n) = +2*a(n-1) -2*a(n-2) +2*a(n-3) -a(n-4).
%F G.f. -x*(1-3*x+x^2) / ( (x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Aug 11 2012
%F a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4. - _Colin Barker_, Oct 19 2015
%t Flatten[Table[{2n, 2n - 1, 2n + 1, 2n + 3}, {n, 0, 19}]] (* _Alonso del Arte_, Aug 09 2012 *)
%o (PARI) a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4 \\ _Colin Barker_, Oct 19 2015
%o (PARI) concat(0, Vec(-x*(1-3*x+x^2)/((x^2+1)*(x-1)^2) + O(x^100))) \\ _Colin Barker_, Oct 19 2015
%Y Quadrisections: A005843, A060747, A005408, A144396.
%K sign,easy,less
%O 0,4
%A _Paul Curtz_, Aug 09 2012
|