OFFSET
0,1
COMMENTS
Sum of the parts in the partitions of 2*n-2 and 2*n+2 into two even parts, for n>0 (see example).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: 2*(1 + x*(1 + x*(-1 + x*(5 + 2*x)))) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4.
a(n) = (2n + 2)*floor((n + 1)/2) + (2n - 2)*floor((n - 1)/2).
EXAMPLE
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.
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.
MATHEMATICA
Table[2 (n^2 + 1) - n (1 + (-1)^n), {n, 0, 50}]
CoefficientList[Series[2 (1 + x (1 + x (-1 + x (5 + 2 x))))/((1 - x)^3 (1 + x)^2), {x, 0, 50}], x]
PROG
(Magma) [2*(n^2+1)-n*(1+(-1)^n): n in [0..50]];
(PARI) vector(150, n, 2*((n-1)^2+1)-(n-1)*(1-(-1)^n)) \\ Derek Orr, Jul 31 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jul 31 2014
STATUS
approved