login
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2, a(0)=-1, a(1)=-2, a(2)=-4.
2

%I #33 Jun 13 2015 00:55:22

%S -1,-2,-4,1,2,13,26,61,122,253,506,1021,2042,4093,8186,16381,32762,

%T 65533,131066,262141,524282,1048573,2097146,4194301,8388602,16777213,

%U 33554426,67108861,134217722,268435453,536870906,1073741821,2147483642,4294967293

%N a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2, a(0)=-1, a(1)=-2, a(2)=-4.

%C The main diagonal of the difference table is -A000079(n) = -2^n.

%C a(n) mod 9 is of period 6: repeat 8, 7, 5, 1, 2, 4.

%C a(n) + a(n+1) = -3, -6, -3, 3, 15, ...; all are multiples of 3.

%H Colin Barker, <a href="/A254076/b254076.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-2).

%F a(2n+1) = A141725(n-1), a(2n+2) = 2*a(2n+1).

%F a(n+1) = 2*a(n) + (period 2: repeat 0, 9), n>0.

%F a(n) = -A157823(n) - (period 2: repeat 6, 3).

%F a(n+1) = a(n) - A156067(n).

%F a(n+2) = a(n) + 3*2^(n-1), n>0.

%F a(n+4) = a(n) + 15*2^(n-1), n>0.

%F a(n+6) = a(n) + 63*2^(n-1), n>0.

%F a(n) = (2^n - 3*(-1)^n - 9)/2 for n>0. - _Colin Barker_, Jan 30 2015

%F G.f.: (9*x^3+x^2-1) / ((x-1)*(x+1)*(2*x-1)). - _Colin Barker_, Jan 30 2015

%t a[0] = -1; a[n_] := 2^(n-1) + 3*Mod[n, 2] - 6; Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Feb 04 2015 *)

%o (PARI) Vec((9*x^3+x^2-1)/((x-1)*(x+1)*(2*x-1)) + O(x^100)) \\ _Colin Barker_, Jan 30 2015

%Y Cf. A000079, A010704, A141725, A153130, A156067, A157823.

%K sign,easy

%O 0,2

%A _Paul Curtz_, Jan 29 2015