login
Partial sums of the even triangular numbers (A014494).
2

%I #35 Mar 11 2022 20:48:34

%S 0,6,16,44,80,146,224,344,480,670,880,1156,1456,1834,2240,2736,3264,

%T 3894,4560,5340,6160,7106,8096,9224,10400,11726,13104,14644,16240,

%U 18010,19840,21856,23936,26214,28560,31116,33744,36594,39520,42680,45920,49406,52976,56804

%N Partial sums of the even triangular numbers (A014494).

%C The absolute difference between the n-th partial sum of the odd triangular numbers and the (n-1)-th partial sum of the even triangular numbers is equal to n; see formula.

%C Partial sums of the even generalized hexagonal numbers. - _Omar E. Pol_, Mar 05 2022

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).

%F a(n) = Sum_{k=0..n-1} A014494(k) = Sum_{k=0..n-1} (2*k+1)(2*k+1-(-1)^k)/2.

%F |A352116(n) - a(n-1)| = n.

%F A352116(n) + a(n-1) = A000447(n), (n >= 1).

%F From _Stefano Spezia_, Mar 05 2022: (Start)

%F a(n) = (n + 1)*(4*n^2 + 8*n + 3 - 3*(-1)^n)/6.

%F G.f.: 2*x*(3 + 2*x + 3*x^2)/((1 - x)^4*(1 + x)^2). (End)

%e a(0) = 0 because 0 is the first even term in A000217.

%e a(1) = 6, the sum of the first two even terms in A000217, and so on.

%t LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 6, 16, 44, 80, 146}, 50] (* _Amiram Eldar_, Mar 05 2022 *)

%o (PARI) te(n) = (2*n+1)*(2*n+1-(-1)^n)/2; \\ A014494

%o a(n) = sum(k=0, n, te(k)); \\ _Michel Marcus_, Mar 06 2022

%o (Python)

%o def A352115(n): return (n + 1)*(2*n*(n+2) + 3*(n%2))//3 # _Chai Wah Wu_, Mar 11 2022

%Y Cf. A001477, A000217, A000292, A014493, A014494, A352116, A000447.

%K nonn,easy

%O 0,2

%A _David James Sycamore_, Mar 05 2022