login
A122959
a(0) = 1, a(n) = (-1)^n*(2-2^(n-1)) for n>0.
1
1, -1, 0, 2, -6, 14, -30, 62, -126, 254, -510, 1022, -2046, 4094, -8190, 16382, -32766, 65534, -131070, 262142, -524286, 1048574, -2097150, 4194302, -8388606, 16777214, -33554430, 67108862, -134217726, 268435454, -536870910, 1073741822, -2147483646
OFFSET
0,4
FORMULA
a(0) = 1, a(1) = -1, a(2) = 0, a(n) = (-3)*a(n-1)-2*a(n-2) for n>2 .
G.f. : (1+2*x-x^2)/(1+3*x+2*x^2).
MATHEMATICA
Join[{1}, LinearRecurrence[{-3, -2}, {-1, 0}, 50]] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
PROG
(PARI) Vec((1+2*x-x^2)/(1+3*x+2*x^2) + O(x^40)) \\ Michel Marcus, Nov 29 2015
CROSSREFS
Apart from signs, same as A000918.
Sequence in context: A327048 A228038 A122958 * A095121 A296965 A000918
KEYWORD
sign
AUTHOR
Philippe Deléham, Oct 26 2006
EXTENSIONS
a(22) corrected by Vincenzo Librandi, Feb 24 2012
STATUS
approved