OFFSET
0,1
COMMENTS
Sum of the parts in the partitions of 2n+2 and 2n-2 into two odd parts.
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^2)*(1 + x + 2 x^2)/((1 - x)^3*(1 + x)^2).
Recurrence: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4.
a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n).
a(n) = (2n + 2)*ceiling((n + 1)/2) + (2n - 2)*ceiling((n - 1)/2).
EXAMPLE
a(0) = 2; There are no partitions of 2(0)-2 = -2, and the odd partitions of 2(0)+2 = 2 into two odd parts is (1,1). The sum of these parts is 2.
a(2) = 14; The partitions of 2(2)-2 = 2 into two odd parts is (1,1) and the partitions of 2(2)+2 = 6 into two odd parts is (5,1) and (3,3). The sum of the parts in these partitions is 1 + 1 + 5 + 1 + 3 + 3 = 14.
MATHEMATICA
Table[2n^2 + n + 2 + n(-1)^n, {n, 0, 50}]
CoefficientList[Series[2 (1 + x^2) (1 + x + 2 x^2)/((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(100, n, 2*((n-1)^2 + 1) + (n-1)*(1 - (-1)^n)) \\ Derek Orr, Jul 31 2014
(GAP) List([0..10^3], n->2*(n^2+1)+n*(1+(-1)^n)); # Muniru A Asiru, Feb 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jul 31 2014
STATUS
approved