OFFSET
0,6
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-3,4,-3,2,1,-4,6,-8,6,-4,1,2,-3,4,-3,2,-1).
FORMULA
a(n) = Sum_{j=1..floor(n/3)} Sum_{k=j..floor((n-j)/2)} (n-j-k) * ((k+1) mod 2).
a(n) = 2*a(n-1) - 3*a(n-2) + 4*a(n-3) - 3*a(n-4) + 2*a(n-5) + a(n-6) - 4*a(n-7) + 6*a(n-8) - 8*a(n-9) + 6*a(n-10) - 4*a(n-11) + a(n-12) + 2*a(n-13) - 3*a(n-14) + 4*a(n-15) - 3*a(n-16) + 2*a(n-17) - a(n-18).
a(n) ~ 11*n^3/432. - Charles R Greathouse IV, May 31 2026
EXAMPLE
a(10) = 22; There are 4 partitions of 10 into 3 parts whose middle part is even: (7,2,1), (5,4,1), (6,2,2) and (4,4,2). The sum of the largest parts of these partitions is 7+5+6+4 = 22.
MATHEMATICA
Table[Sum[Sum[(n - j - k)*Mod[k + 1, 2], {k, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 0, 100}]
LinearRecurrence[{2, -3, 4, -3, 2, 1, -4, 6, -8, 6, -4, 1, 2, -3, 4, -3, 2, -1}, {0, 0, 0, 0, 0, 2, 5, 7, 9, 15, 22, 30, 39, 51, 64, 78, 93, 117}, 100]
PROG
(PARI) a(n)=(11*n^3-9*n^2+[-72, -51, -60, -99, -168, -51, 36, -51, -168, -99, -60, -51][n%12+1]*n+[0, 49, 68, 81, 112, -31, -108, 49, 176, 81, 4, -31][n%12+1])/432 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Wesley Ivan Hurt, Feb 13 2026
STATUS
approved
