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.

A153056 a(0)=2, a(n) = n^2+a(n-1).

Original entry on oeis.org

2, 3, 7, 16, 32, 57, 93, 142, 206, 287, 387, 508, 652, 821, 1017, 1242, 1498, 1787, 2111, 2472, 2872, 3313, 3797, 4326, 4902, 5527, 6203, 6932, 7716, 8557, 9457, 10418, 11442, 12531, 13687, 14912, 16208, 17577, 19021, 20542, 22142, 23823, 25587
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a=2;lst={};Do[a=n^2+a;AppendTo[lst,a],{n,0,5!}];lst
    nxt[{n_,a_}]:={n+1,(n+1)^2+a}; NestList[nxt,{0,2},50][[;;,2]] (* or *) LinearRecurrence[{4,-6,4,-1},{2,3,7,16},50] (* Harvey P. Dale, Sep 05 2023 *)
  • PARI
    a(n) = n*(n+1)*(2*n+1)/6 + 2; \\ Altug Alkan, Apr 30 2018

Formula

G.f.: (2-5x+7x^2-2x^3)/(1-x)^4. a(n)=2+n(1+2n^2+3n)/6 = 2+A000330(n). - R. J. Mathar, Jan 08 2009