login
A083321
a(n) = (-1)^n + (-2)^n - (-3)^n.
7
1, 0, -4, 18, -64, 210, -664, 2058, -6304, 19170, -58024, 175098, -527344, 1586130, -4766584, 14316138, -42981184, 129009090, -387158344, 1161737178, -3485735824, 10458256050, -31376865304, 94134790218, -282412759264, 847255055010, -2541798719464, 7625463267258
OFFSET
0,3
FORMULA
G.f.: (1+6*x+7*x^2)/((1+x)*(1+2*x)*(1+3*x)).
E.g.f.: exp(-x)+exp(-2*x)-exp(-3*x).
a(n) = (-1)^(n-1)*(3^n - 2^n - 1) for n >= 0. - M. F. Hasler, Apr 19 2020
MATHEMATICA
a[n_]:=(-1)^n*(1+2^n-3^n); (* Vladimir Joseph Stephan Orlovsky, Dec 05 2008, corrected by M. F. Hasler, Apr 20 2020 *)
LinearRecurrence[{-6, -11, -6}, {1, 0, -4}, 30] (* Harvey P. Dale, Mar 05 2022 *)
PROG
(Magma) [(-1)^n+(-2)^n-(-3)^n: n in [0..30]]; // Vincenzo Librandi, Sep 05 2011
(PARI) apply( A083321(n)=(-1)^n*(1+2^n-3^n), [0..33]) \\ M. F. Hasler, Apr 19 2020
CROSSREFS
Cf. A001550 (1^n + 2^n + 3^n).
Sequence in context: A165910 A212766 A100177 * A362316 A255611 A022728
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 25 2003
STATUS
approved