A274248 Row sums of A273751.
1, 5, 16, 37, 72, 124, 197, 294, 419, 575, 766, 995, 1266, 1582, 1947, 2364, 2837, 3369, 3964, 4625, 5356, 6160, 7041, 8002, 9047, 10179, 11402, 12719, 14134, 15650, 17271, 19000, 20841, 22797, 24872, 27069, 29392, 31844, 34429, 37150, 40011, 43015, 46166
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
Programs
-
Magma
[(n*(20-6*n+28*n^2) + 3*(1-(-1)^n))/48: n in [1..40]]; // G. C. Greubel, Oct 19 2023
-
Mathematica
(* First program *) T[n_, k_]:= T[n, k]= Which[k==n, n(n-1) + 1, k==n-1, (n-1)^2 + 1, k==1, n + T[n-2, 1], 1 < k < n-1, T[n-1, k+1] + 1, True, 0]; a[n_]:= Sum[T[n, k], {k, 1, n}]; Array[a, 40] (* second program: *) LinearRecurrence[{3, -2, -2, 3, -1}, {1, 5, 16, 37, 72}, 50] (* Vincenzo Librandi, Jun 16 2016 *)
-
SageMath
[(n*(20-6*n+28*n^2) + 6*(n%2))/48 for n in range(1,41)] # G. C. Greubel, Oct 19 2023
Formula
a(n) = (14*n^3 - 3*n^2 + 10*n + 3*mod(n, 2))/24.
G.f.: x*(1 + 2*x + 3*x^2 + x^3)/((1 - x)^4*(1 + x)). - Ilya Gutkovskiy, Jun 17 2016
E.g.f.: (1/48)*( -3*exp(-x) + (3 + 42*x + 78*x^2 + 28*x^3)*exp(x) ). - G. C. Greubel, Oct 19 2023