login
A387541
Sum of the even parts in the partitions of n into 2 parts.
2
0, 0, 0, 2, 4, 6, 6, 12, 16, 20, 20, 30, 36, 42, 42, 56, 64, 72, 72, 90, 100, 110, 110, 132, 144, 156, 156, 182, 196, 210, 210, 240, 256, 272, 272, 306, 324, 342, 342, 380, 400, 420, 420, 462, 484, 506, 506, 552, 576, 600, 600, 650, 676, 702, 702, 756, 784
OFFSET
0,4
FORMULA
a(n) = (2*n^2-2*n-1-(2*n-1)*(-1)^n+n*(1+(-1)^(n/2))*(1+(-1)^n))/8.
a(n) = Sum_{k=1..floor(n/2)} k*((k+1) mod 2) + (n-k)*((n-k+1) mod 2).
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9).
From Stefano Spezia, Sep 02 2025: (Start)
G.f.: 2*x^3*(1 + x + x^2 + x^4)/((1 - x)^3*(1 + x + x^2 + x^3)^2).
E.g.f.: (x*(1 + x)*cosh(x) - x*sin(x) - (1 - x^2)*sinh(x))/4. (End)
a(n) = A093353(n-1) - A387539(n) for n >= 1. - Wesley Ivan Hurt, Nov 29 2025
EXAMPLE
a(4) = 4, The partitions of 4 into two parts are (3,1) and (2,2) and 2+2 = 4;
a(5) = 6, The partitions of 5 into two parts are (4,1) and (3,2) and 2+4 = 6;
a(6) = 6, (5,1), (4,2), (3,3) and 2+4 = 6;
a(7) = 12, (6,1), (5,2), (4,3) and 2+4+6 = 12.
MATHEMATICA
Table[Total[Select[Flatten[IntegerPartitions[n, {2}]], EvenQ]], {n, 0, 80}]
LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {0, 0, 0, 2, 4, 6, 6, 12, 16}, 80]
PROG
(Magma) [(2*n^2-2*n-1-(2*n-1)*(-1)^n+n*(1+(-1)^(n div 2))*(1+(-1)^n)) div 8 : n in [0..80]];
CROSSREFS
Cf. A093353, A387539 (sum of odd parts).
Sequence in context: A285103 A123258 A278227 * A104968 A286894 A346911
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 01 2025
STATUS
approved