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.

A049480 a(n) = (2*n-1)*(n^2 -n +6)/6.

Original entry on oeis.org

1, 4, 10, 21, 39, 66, 104, 155, 221, 304, 406, 529, 675, 846, 1044, 1271, 1529, 1820, 2146, 2509, 2911, 3354, 3840, 4371, 4949, 5576, 6254, 6985, 7771, 8614, 9516, 10479, 11505, 12596, 13754, 14981, 16279, 17650, 19096, 20619, 22221
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2001

Keywords

Crossrefs

1/12*t*(2*n^3-3*n^2+n)+2*n-1 for t = 2, 4, 6, ... gives A049480, A005894, A063488, A001845, A063489, A005898, A063490, A057813, A063491, A005902, A063492, A005917, A063493, A063494, A063495, A063496.

Programs

  • Magma
    [(2*n-1)*(n^2-n+6)/6: n in [1..30]]; // G. C. Greubel, Dec 01 2017
    
  • Mathematica
    Table[(2n-1)(n^2-n+6)/6,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,4,10,21},50] (* Harvey P. Dale, Jan 01 2012 *)
  • PARI
    a(n)=(2*n-1)*(n^2-n+6)/6 \\ Charles R Greathouse IV, Sep 24 2015
    
  • PARI
    x='x+O('x^30); Vec(serlaplace((-6 + 12*x + 3*x^2 + 2*x^3)*exp(x)/6 + 1)) \\ G. C. Greubel, Dec 01 2017

Formula

From Harvey P. Dale, Jan 01 2012: (Start)
G.f.: x*(x^3 + 1)/(x-1)^4.
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4); a(1)=1, a(2)=4, a(3)=10, a(4)=21. (End)
E.g.f.: (-6 + 12*x + 3*x^2 + 2*x^3)*exp(x)/6 + 1. - G. C. Greubel, Dec 01 2017