OFFSET
0,2
COMMENTS
In general, sequences of the form a(n) = sum((k+x+2)!/(k+x)!,k=1..n) have a closed form a(n) = n*(11+12*x+3*x^2+3*x*n+6*n+n^2)/3.
This sequence is related to A033487 by A033487(n) = n*a(n)-sum(a(i), i=0..n-1). - Bruno Berselli, Jan 24 2011
The minimal number of multiplications (using schoolbook method) needed to compute the matrix chain product of a sequence of n+1 matrices having dimensions 1 X 2, 2 X 3, ..., (n+1) X (n+2), respectively. - Alois P. Heinz, Jan 27 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
B. Berselli, A description of the recursive method in Comments lines: website Matem@ticamente (in Italian).
Wikipedia, Matrix chain multiplication
Wikipedia, Schoolbook matrix multiplication
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = +4*a(n-1)-6*a(n-2)+4*a(n-3)-1*a(n-4) for n>=4.
a(n) = n*(n^2+6*n+11)/3.
From Bruno Berselli, Jan 24 2011: (Start)
G.f.: 2*x*(3-3*x+x^2)/(1-x)^4. [corrected by Georg Fischer, May 10 2019]
Sum(a(k), k=0..n) = 2*A005718(n) for n>0. (End)
MATHEMATICA
f[n_]:=n*(n^2 + 6 n + 11)/3; f[Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Feb 10 2011*)
CoefficientList[Series[2*x*(3 - 3*x + x^2)/(1 - x)^4, {x, 0, 50}], x] (* Vaclav Kotesovec, May 10 2019 *)
Table[Sum[(k+1)(k+2), {k, n}], {n, 0, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {0, 6, 18, 38}, 50] (* Harvey P. Dale, Apr 21 2020 *)
PROG
(Magma) [n*(n^2+6*n+11)/3: n in [0..45]]; // Vincenzo Librandi, Jun 15 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Aug 10 2010
STATUS
approved