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.

A081435 Diagonal in array of n-gonal numbers A081422.

Original entry on oeis.org

1, 5, 18, 46, 95, 171, 280, 428, 621, 865, 1166, 1530, 1963, 2471, 3060, 3736, 4505, 5373, 6346, 7430, 8631, 9955, 11408, 12996, 14725, 16601, 18630, 20818, 23171, 25695, 28396, 31280, 34353, 37621, 41090, 44766, 48655, 52763, 57096, 61660
Offset: 0

Views

Author

Paul Barry, Mar 21 2003

Keywords

Comments

One of a family of sequences with palindromic generators.

Crossrefs

Programs

  • GAP
    List([0..40], n-> (n+1)*(2*(n+1)^2-3*n)/2); # G. C. Greubel, Aug 14 2019
  • Magma
    [(2*n^3+3*n^2+3*n+2)/2: n in [0..40]]; // Vincenzo Librandi, Aug 08 2013
    
  • Maple
    a := n-> (n+1)*(2*(n+1)^2-3*n)/2; seq(a(n), n = 0..40); # G. C. Greubel, Aug 14 2019
  • Mathematica
    Table[(n^3 +(n+1)^3 -1)/2 +1, {n,0,40}] (* Vladimir Joseph Stephan Orlovsky, May 04 2011 *)
    CoefficientList[Series[(1 +3x^2 -4x^3)/(1-x)^5, {x,0,40}], x] (* Vincenzo Librandi, Aug 08 2013 *)
    LinearRecurrence[{4,-6,4,-1},{1,5,18,46},40] (* Harvey P. Dale, Dec 28 2024 *)
  • PARI
    vector(40, n, n--; (n+1)*(2*(n+1)^2-3*n)/2) \\ G. C. Greubel, Aug 14 2019
    
  • Sage
    [(n+1)*(2*(n+1)^2-3*n)/2 for n in (0..40)] # G. C. Greubel, Aug 14 2019
    

Formula

a(n) = (2*n^3 +3*n^2 +3*n +2)/2.
G.f.: (1 +3*x^2 -4*x^3)/(1-x)^5.
E.g.f.: (2 +8*x +9*x^2 +2*x^3)*exp(x)/2. - G. C. Greubel, Aug 14 2019