This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A335927 #16 Sep 27 2024 13:00:53 %S A335927 1,2,7,20,50,115,251,530,1096,2237,4529,9124,18326,36743,73591,147302, %T A335927 294740,589633,1179437,2359064,4718338,9436907,18874067,37748410, %U A335927 75497120,150994565,301989481,603979340,1207959086 %N A335927 a(n+1) = Sum_{k=1..n} (a(k) + k*(n-k)), with a(1)=1. %C A335927 First column of matrix given by: %C A335927 C(1,1) = 1, %C A335927 C(n,k+1) = C(n,k) + n, %C A335927 C(n+1,1) = Sum_{k=1..n-1} C(k, n-k+1); %C A335927 where C(i,j) denotes cell at row i and column j %C A335927 1 2 3 4 5 6 .. %C A335927 2 4 6 8 10 ... %C A335927 7 10 13 16 ... %C A335927 20 24 28 ... %C A335927 50 55 ... %C A335927 115... %C A335927 ------- %C A335927 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: %C A335927 1 2 3 4 5 6 ... %C A335927 2 4 6 8 10 ... %C A335927 7 10 13 16 ... %C A335927 20 24 28 ... %C A335927 50 55 ... %C A335927 115... %H A335927 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,7,-2). %F A335927 a(1) = 1, a(n+1) = Sum_{k=1..n} (a(k) + k*(n-k)); for n>1. %F A335927 a(n) = 1/4 * (9*2^n - 2*n^2 - 6*n - 8); for n > 1. %F A335927 a(n+1) = 2 * a(n) + A253145(n-1). %F A335927 From _Stefano Spezia_, Jul 02 2020: (Start) %F A335927 G.f.: x*(1 - 3*x + 6*x^2 - 4*x^3 + x^4)/((1 - x)^3*(1 - 2*x)). %F A335927 a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n > 5. (End) %t A335927 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 *) %t A335927 LinearRecurrence[{5,-9,7,-2},{1,2,7,20,50},30] (* _Harvey P. Dale_, Sep 27 2024 *) %o A335927 (Python) %o A335927 def a(n): %o A335927 if n == 1: return 1 %o A335927 return sum([a(k) + k*(n-k) for k in range(1,n)]) %Y A335927 Cf. A253145. %K A335927 nonn %O A335927 1,2 %A A335927 _Daniel Cieslinski_, Jul 01 2020