OFFSET
0,3
COMMENTS
a(n) mod 100 = 49 for n = 4*k + 1, k > 0; a(n) mod 100 = 3 for n = 4*k + 2, k >= 0. [Alex Ratushnyak, Jul 03 2012]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9,-26,24).
FORMULA
G.f.: -(1-8*x+14*x^2)/((1-2*x)*(1-3*x)*(1-4*x)). - Bruno Berselli, Jul 04 2012
a(0)=-1, a(1)=-1, a(2)=3, a(n) = 9*a(n-1) - 26*a(n-2) + 24*a(n-3). - Harvey P. Dale, Sep 19 2012
E.g.f.: exp(2*x)*(exp(2*x) - exp(x) - 1). - Elmo R. Oliveira, Sep 12 2024
MAPLE
MATHEMATICA
Table[4^n - 3^n - 2^n, {n, 0, 25}] (* Bruno Berselli, Jul 04 2012 *)
LinearRecurrence[{9, -26, 24}, {-1, -1, 3}, 30] (* Harvey P. Dale, Sep 19 2012 *)
CoefficientList[Series[-(1 - 8 x + 14 x^2)/((1 - 2 x) (1 - 3 x) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
PROG
(Python)
print([4**n - 3**n - 2**n for n in range(99)])
# Alex Ratushnyak, Jul 03 2012
(PARI) a(n) = 4^n-3^n-2^n; \\ Joerg Arndt, Jul 04 2012
(Magma) I:=[-1, -1, 3]; [n le 3 select I[n] else 9*Self(n-1)-26*Self(n-2)+24*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Feb 12 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 28 2008
EXTENSIONS
Offset set to 0, terms corrected, more terms added by Alex Ratushnyak, Jul 03 2012.
STATUS
approved