login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A335927
a(n+1) = Sum_{k=1..n} (a(k) + k*(n-k)), with a(1)=1.
0
1, 2, 7, 20, 50, 115, 251, 530, 1096, 2237, 4529, 9124, 18326, 36743, 73591, 147302, 294740, 589633, 1179437, 2359064, 4718338, 9436907, 18874067, 37748410, 75497120, 150994565, 301989481, 603979340, 1207959086
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...
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
Cf. A253145.
Sequence in context: A360421 A123203 A309298 * A261054 A134311 A362973
KEYWORD
nonn
AUTHOR
Daniel Cieslinski, Jul 01 2020
STATUS
approved