A352115 Partial sums of the even triangular numbers (A014494).
0, 6, 16, 44, 80, 146, 224, 344, 480, 670, 880, 1156, 1456, 1834, 2240, 2736, 3264, 3894, 4560, 5340, 6160, 7106, 8096, 9224, 10400, 11726, 13104, 14644, 16240, 18010, 19840, 21856, 23936, 26214, 28560, 31116, 33744, 36594, 39520, 42680, 45920, 49406, 52976, 56804
Offset: 0
Examples
a(0) = 0 because 0 is the first even term in A000217. a(1) = 6, the sum of the first two even terms in A000217, and so on.
Links
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
Programs
-
Mathematica
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 6, 16, 44, 80, 146}, 50] (* Amiram Eldar, Mar 05 2022 *)
-
PARI
te(n) = (2*n+1)*(2*n+1-(-1)^n)/2; \\ A014494 a(n) = sum(k=0, n, te(k)); \\ Michel Marcus, Mar 06 2022
-
Python
def A352115(n): return (n + 1)*(2*n*(n+2) + 3*(n%2))//3 # Chai Wah Wu, Mar 11 2022
Formula
a(n) = Sum_{k=0..n-1} A014494(k) = Sum_{k=0..n-1} (2*k+1)(2*k+1-(-1)^k)/2.
|A352116(n) - a(n-1)| = n.
From Stefano Spezia, Mar 05 2022: (Start)
a(n) = (n + 1)*(4*n^2 + 8*n + 3 - 3*(-1)^n)/6.
G.f.: 2*x*(3 + 2*x + 3*x^2)/((1 - x)^4*(1 + x)^2). (End)
Comments