A145069 a(n) = n*(n^2 + 3*n + 5)/3.
0, 3, 10, 23, 44, 75, 118, 175, 248, 339, 450, 583, 740, 923, 1134, 1375, 1648, 1955, 2298, 2679, 3100, 3563, 4070, 4623, 5224, 5875, 6578, 7335, 8148, 9019, 9950, 10943, 12000, 13123, 14314, 15575, 16908, 18315, 19798, 21359, 23000, 24723, 26530
Offset: 0
Examples
a(2) = a(1) + 2^2 + 2 + 1 = 3 + 4 + 2 + 1 = 10. a(3) = a(2) + 3^2 + 3 + 1 = 10 + 9 + 3 + 1 = 23.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000 (corrected by Ray Chandler, Jan 19 2019)
- Cleve Moler, LINPACK subroutine sgefa.f, University of New Mexico, Argonne National Lab, 1978.
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Crossrefs
Programs
-
Magma
I:=[0, 3, 10, 23]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 30 2012
-
Maple
A145069:=n->n*(n^2+3*n+5)/3: seq(A145069(n), n=0..100); # Wesley Ivan Hurt, Aug 21 2014
-
Mathematica
lst={};s=0;Do[s+=n^2+n+1;AppendTo[lst,s-1],{n,0,5!}];lst CoefficientList[Series[x(3-2*x+x^2)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 30 2012 *) Table[n (n^2+3n+5)/3,{n,0,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,3,10,23},50] (* Harvey P. Dale, Sep 10 2016 *)
-
PARI
{a=0; for(n=1, 42, print1(a, ", "); a=a+n^2+n+1)} \\ adapted by Michel Marcus, Aug 23 2014
Formula
G.f.: x*(3-2*x+x^2)/(1-x)^4.
a(n) = Sum_{j=2..n+1} A002061(j).
a(n) = a(n-1) + n^2 + n + 1 for n > 0, with a(0) = 0.
a(n) = n*(n^2+3*n+5)/3. - Bruno Berselli, Apr 01 2011
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 30 2012
a(n) = Sum_{i=1..n} 3i+(n-i)^2. - Wesley Ivan Hurt, Aug 21 2014
a(n) = A007290(n+2) + n. - Hugo Pfoertner, Mar 28 2018
Extensions
Edited by Klaus Brockhaus, Oct 21 2008
G.f. adapted to the offset by Bruno Berselli, Apr 01 2011
Name, offset, and formulas changed by Wesley Ivan Hurt, Aug 21 2014
Comments