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.

Showing 1-5 of 5 results.

A099783 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k)*3^(n-2*k).

Original entry on oeis.org

1, 3, 9, 30, 108, 405, 1548, 5967, 23085, 89451, 346842, 1345248, 5218263, 20242872, 78528609, 304640595, 1181814705, 4584708702, 17785841652, 68998115709, 267670245492, 1038395956527, 4028337876861, 15627474388899, 60624993311226
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).

Crossrefs

Programs

  • GAP
    a:=[1,3,9];; for n in [4..30] do a[n]:=6*a[n-1]-9*a[n-2]+3*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,3,9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 3*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-3*x)/((1-3*x)^2 - 3*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{6,-9,3}, {1,3,9}, 30] (* G. C. Greubel, Sep 04 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)/((1-3*x)^2 - 3*x^3)) \\ G. C. Greubel, Sep 04 2019
    
  • Sage
    def A099783_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)/((1-3*x)^2 - 3*x^3)).list()
    A099783_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1-3*x)/((1-3*x)^2 - 3*x^3).
a(n) = 6*a(n-1) - 9*a(n-2) + 3*a(n-3).

A099784 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * 2^k * (-2)^(n-3*k).

Original entry on oeis.org

1, -2, 4, -6, 4, 16, -92, 312, -848, 1960, -3824, 5760, -3824, -15392, 88384, -299616, 814144, -1881344, 3669568, -5524608, 3657472, 14807680, -84909824, 287723520, -781639424, 1805843968, -3521371136, 5298829824
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).

Crossrefs

Programs

  • GAP
    a:=[1,-2,4];; for n in [4..30] do a[n]:=-4*a[n-1]-4*a[n-2] + 2*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,-2,4]; [n le 3 select I[n] else -4*Self(n-1) - 4*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-2*x)/((1-2*x)^2 - 2*x^3), x, n+1), x, n), n = 0 .. 30); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{-4,-4,2}, {1,-2,4}, 30] (* G. C. Greubel, Sep 04 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-2*x)/((1-2*x)^2 - 2*x^3)) \\ G. C. Greubel, Sep 04 2019
    
  • Sage
    def A099784_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-2*x)/((1-2*x)^2 - 2*x^3)).list()
    A099784_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1+2*x)/((1+2*x)^2 - 2*x^3).
a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k)*2^(n-2*k)*(-1)^(n-3*k).
a(n) = -4*a(n-1) - 4*a(n-2) + 2*a(n-3).

A099786 a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k)*3^(n-4*k).

Original entry on oeis.org

1, 3, 9, 27, 82, 255, 819, 2727, 9397, 33312, 120537, 441855, 1631017, 6036879, 22345074, 82589247, 304612975, 1120960983, 4116353265, 15088372416, 55224373105, 201895801851, 737506551321, 2692518758163, 9826402960882
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * u^k * v^(n-4*k) has g.f. (1-v*x)^2/((1-v*x)^3 - u*x^4) and satisfies the recurrence a(n) = 3*v*a(n-1) - 3*v^2*a(n-2) + v^3*a(n-3) + u*a(n-4).

Crossrefs

Programs

  • GAP
    a:=[1,3,9,27];; for n in [5..30] do a[n]:=9*a[n-1]-27*a[n-2] + 27*a[n-3] +a[n-4]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,3,9,27]; [n le 4 select I[n] else 9*Self(n-1) - 27*Self(n-2) + 27*Self(n-3) +Self(n-4): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-3*x)^2/((1-3*x)^3 - x^4), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{9,-27,27,1},{1,3,9,27},40] (* or *) CoefficientList[ Series[-((1-3 x)^2/(x (x (x (x+27)-27)+9)-1)),{x,0,40}],x] (* Harvey P. Dale, Jun 06 2011 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)^2/((1-3*x)^3 - x^4)) \\ G. C. Greubel, Sep 04 2019
    
  • Sage
    def A099786_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)^2/((1-3*x)^3 - x^4)).list()
    A099786_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1-3*x)^2/((1-3*x)^3 - x^4).
a(n) = 9*a(n-1) - 27*a(n-2) + 27*a(n-3) + a(n-4).

A099787 a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * 2^k * 3^(n-4*k).

Original entry on oeis.org

1, 3, 9, 27, 83, 267, 909, 3267, 12235, 46983, 182529, 711099, 2764619, 10704147, 41257341, 158371011, 605932099, 2312728095, 8812918161, 33549513579, 127652354627, 485608571547, 1847326271949, 7028217617859, 26742885359131
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/4)} C(n-k,3*k) * u^k * v^(n-4*k) has g.f. (1-v*x)^2/((1-v*x)^3 - u*x^4) and satisfies the recurrence a(n) = 3*v*a(n-1) - 3*v^2*a(n-2) + v^3*a(n-3) + u*a(n-4).

Crossrefs

Programs

  • GAP
    a:=[1,3,9,27];; for n in [5..30] do a[n]:=9*a[n-1]-27*a[n-2] + 27*a[n-3] +2*a[n-4]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,3,9,27]; [n le 4 select I[n] else 9*Self(n-1) - 27*Self(n-2) + 27*Self(n-3) + 2*Self(n-4): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-3*x)^2/((1-3*x)^3 - 2*x^4), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{9,-27,27,2}, {1,3,9,27}, 30] (* G. C. Greubel, Sep 04 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)^2/((1-3*x)^3 - 2*x^4)) \\ G. C. Greubel, Sep 04 2019
    
  • Sage
    def A099787_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)^2/((1-3*x)^3 - 2*x^4)).list()
    A099787_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1-3*x)^2/((1-3*x)^3 - 2*x^4).
a(n) = 9*a(n-1) - 27*a(n-2) + 27*a(n-3) + 2*a(n-4).

A099782 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * 2^k * 4^(n-3*k).

Original entry on oeis.org

1, 4, 16, 66, 280, 1216, 5380, 24144, 109504, 500488, 2300128, 10612224, 49096720, 227578432, 1056304384, 4907373600, 22813275520, 106100835328, 493609021504, 2296885357824, 10689540189184, 49753373831296, 231588118339072
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).

Crossrefs

Programs

  • GAP
    a:=[1,4,16];; for n in [4..30] do a[n]:=8*a[n-1]-16*a[n-2] + 2*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,4,16]; [n le 3 select I[n] else 8*Self(n-1) - 16*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-4*x)/((1-4*x)^2 - 2*x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{8,-16,2}, {1,4,16}, 30] (* G. C. Greubel, Sep 04 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-4*x)/((1-4*x)^2 - 2*x^3)) \\ G. C. Greubel, Sep 04 2019
    
  • Sage
    def A099782_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-4*x)/((1-4*x)^2 - 2*x^3)).list()
    A099782_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1-4*x)/((1-4*x)^2 - 2*x^3).
a(n) = 8*a(n-1) - 16*a(n-2) + 2*a(n-3).
Showing 1-5 of 5 results.