login
A137786
a(n) = 4^n - 3^n - 2^n.
1
-1, -1, 3, 29, 159, 749, 3303, 14069, 58719, 241949, 988503, 4015109, 16241679, 65506349, 263636103, 1059360149, 4251855039, 17050597949, 68331794103, 273715121189, 1096023794799, 4387584060749, 17560800790503, 70274592610229, 281192530396959, 1125052584678749
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]
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
A137786:=n->4^n - 3^n - 2^n; seq(A137786(n), n=0..25); # Wesley Ivan Hurt, Feb 10 2014
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
EXTENSIONS
Offset set to 0, terms corrected, more terms added by Alex Ratushnyak, Jul 03 2012.
STATUS
approved