login
A145069
a(n) = n*(n^2 + 3*n + 5)/3.
1
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,2
COMMENTS
Old name was: Partial sums of A002061, starting at n=2.
Number of floating point dot operations (multiplications and divisions) in the factorization of an (n+1) X (n+1) real matrix by Gaussian elimination as, e.g., implemented in LINPACK subroutines sgefa.f or dgefa.f. The number of multiplications alone is given by A007290. The number of additions is given by A000330. - Hugo Pfoertner, Mar 28 2018
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.
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
EXAMPLE
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.
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 *)
PROG
(PARI) {a=0; for(n=1, 42, print1(a, ", "); a=a+n^2+n+1)} \\ adapted by Michel Marcus, Aug 23 2014
(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
CROSSREFS
Cf. A002061 (n^2 - n + 1).
Cf. A028387 (n + (n+1)^2).
Cf. A077415 (zero followed by partial sums of A028387, starting at n=1).
Cf. A007290.
Sequence in context: A172112 A227347 A068043 * A293350 A256525 A192973
KEYWORD
nonn,easy
AUTHOR
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
STATUS
approved