OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-6,-11,-6).
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
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 25 2003
STATUS
approved