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.

A053730 a(n) = 2^(n-2)*(n^2 - n + 4).

Original entry on oeis.org

1, 2, 6, 20, 64, 192, 544, 1472, 3840, 9728, 24064, 58368, 139264, 327680, 761856, 1753088, 3997696, 9043968, 20316160, 45350912, 100663296, 222298112, 488636416, 1069547520, 2332033024, 5066719232, 10972299264, 23689428992
Offset: 0

Views

Author

N. J. A. Sloane, Mar 24 2000

Keywords

Crossrefs

Cf. A053545.

Programs

  • GAP
    List([0..30], n-> 2^(n-2)*(n^2 -n +4)); # G. C. Greubel, Sep 06 2019
  • Magma
    I:=[1, 2, 6]; [n le 3 select I[n] else 6*Self(n-1)-12*Self(n-2) +8*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 28 2012
    
  • Maple
    seq(2^(n-2)*(n^2 -n +4), n=0..30); # G. C. Greubel, Sep 06 2019
  • Mathematica
    CoefficientList[Series[(1-4*x+6*x^2)/(1-2*x)^3,{x,0,30}],x] (* Vincenzo Librandi, Apr 28 2012 *)
    LinearRecurrence[{6,-12,8}, {1,2,6}, 30] (* G. C. Greubel, Sep 06 2019 *)
  • PARI
    vector(30, n, 2^(n-3)*(n^2 -3*n +6)) \\ G. C. Greubel, Sep 06 2019
    
  • Sage
    [2^(n-2)*(n^2 -n +4) for n in (0..30)] # G. C. Greubel, Sep 06 2019
    

Formula

G.f.: (1-4*x+6*x^2)/(1-2*x)^3. - Colin Barker, Apr 01 2012
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3). - Vincenzo Librandi, Apr 28 2012
a(n) = Sum_{k=0..n} binomial(n,k) * A077028(n,k), where A077028(n,k) = (n-k)*k + 1. - Paul D. Hanna, Oct 11 2015