%I #21 Sep 08 2022 08:46:09
%S 2,4,6,20,26,52,62,100,114,164,182,244,266,340,366,452,482,580,614,
%T 724,762,884,926,1060,1106,1252,1302,1460,1514,1684,1742,1924,1986,
%U 2180,2246,2452,2522,2740,2814,3044,3122,3364,3446,3700,3786,4052,4142,4420
%N a(n) = 2*(n^2 + 1) - n*(1 + (-1)^n).
%C Sum of the parts in the partitions of 2*n-2 and 2*n+2 into two even parts, for n>0 (see example).
%H Michael De Vlieger, <a href="/A245766/b245766.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F G.f.: 2*(1 + x*(1 + x*(-1 + x*(5 + 2*x)))) / ((1 - x)^3*(1 + x)^2).
%F a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4.
%F a(n) = (2n + 2)*floor((n + 1)/2) + (2n - 2)*floor((n - 1)/2).
%e a(1) = 4; there is no partition for 2(1)-2 = 0, and for 2(1)+2 = 4, there is one partition into two even parts (2,2). The sum of these parts = 4.
%e a(3) = 20; 2(3)-2 = 4 has one partition with two even parts (2,2). Also, 2(3)+2 = 8 has two partitions with two even parts: (6,2) and (4,4). The sum total of the parts in these partitions is 2 + 2 + 6 + 2 + 4 + 4 = 20.
%p A245766:=n->2*(n^2+1) - n*(1+(-1)^n): seq(A245766(n), n=0..50);
%t Table[2 (n^2 + 1) - n (1 + (-1)^n), {n, 0, 50}]
%t CoefficientList[Series[2 (1 + x (1 + x (-1 + x (5 + 2 x))))/((1 - x)^3 (1 + x)^2), {x, 0, 50}], x]
%o (Magma) [2*(n^2+1)-n*(1+(-1)^n): n in [0..50]];
%o (PARI) vector(150, n, 2*((n-1)^2+1)-(n-1)*(1-(-1)^n)) \\ _Derek Orr_, Jul 31 2014
%Y Cf. A245764.
%K nonn,easy
%O 0,1
%A _Wesley Ivan Hurt_, Jul 31 2014