OFFSET
1,2
COMMENTS
First column of matrix given by:
C(1,1) = 1,
C(n,k+1) = C(n,k) + n,
C(n+1,1) = Sum_{k=1..n-1} C(k, n-k+1);
where C(i,j) denotes cell at row i and column j
1 2 3 4 5 6 ..
2 4 6 8 10 ...
7 10 13 16 ...
20 24 28 ...
50 55 ...
115...
-------
Can also be seen as diagonal of the following triangle, which is obtained by shifting n-th row of the earlier mentioned matrix, by n-1 cells:
1 2 3 4 5 6 ...
2 4 6 8 10 ...
7 10 13 16 ...
20 24 28 ...
50 55 ...
115...
LINKS
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
a(1) = 1, a(n+1) = Sum_{k=1..n} (a(k) + k*(n-k)); for n>1.
a(n) = 1/4 * (9*2^n - 2*n^2 - 6*n - 8); for n > 1.
a(n+1) = 2 * a(n) + A253145(n-1).
From Stefano Spezia, Jul 02 2020: (Start)
G.f.: x*(1 - 3*x + 6*x^2 - 4*x^3 + x^4)/((1 - x)^3*(1 - 2*x)).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n > 5. (End)
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Sum[a[k] + k*(n - k), {k, 1, n - 1}]; Array[a, 30] (* Amiram Eldar, Jul 02 2020 *)
LinearRecurrence[{5, -9, 7, -2}, {1, 2, 7, 20, 50}, 30] (* Harvey P. Dale, Sep 27 2024 *)
PROG
(Python)
def a(n):
if n == 1: return 1
return sum([a(k) + k*(n-k) for k in range(1, n)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Cieslinski, Jul 01 2020
STATUS
approved