cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A137786 a(n) = 4^n - 3^n - 2^n.

Original entry on oeis.org

-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

Views

Author

Keywords

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]

Crossrefs

Programs

  • 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
  • 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 *)
  • PARI
    a(n) = 4^n-3^n-2^n; \\ Joerg Arndt, Jul 04 2012
    
  • Python
    print([4**n - 3**n - 2**n for n in range(99)])
    # 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

Extensions

Offset set to 0, terms corrected, more terms added by Alex Ratushnyak, Jul 03 2012.