OFFSET
0,8
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1,0,2,-4,4,-4,2,0,-1,2,-2,2,-1).
FORMULA
a(n) = Sum_{j=1..floor(n/3)} Sum_{k=j..floor((n-j)/2)} j * (k mod 2).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) + 2*a(n-6) - 4*a(n-7) + 4*a(n-8) - 4*a(n-9) + 2*a(n-10) - a(n-12) + 2*a(n-13) - 2*a(n-14) + 2*a(n-15) - a(n-16).
a(n) ~ n^3/216. - Charles R Greathouse IV, May 31 2026
EXAMPLE
a(10) = 7; There are 4 partitions of 10 into 3 parts whose middle part is odd: (8,1,1), (6,3,1), (5,3,2) and (4,3,3). The sum of the smallest parts of these partitions is 1+1+2+3 = 7.
MATHEMATICA
Table[Sum[Sum[j*Mod[k, 2], {k, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 0, 100}]
LinearRecurrence[{2, -2, 2, -1, 0, 2, -4, 4, -4, 2, 0, -1, 2, -2, 2, -1}, {0, 0, 0, 1, 1, 1, 1, 2, 4, 7, 7, 8, 10, 13, 17, 23}, 100]
PROG
(PARI) a(n)=(2*n^3+9*n^2+12*[-3, -2, 1, 6, 1, -2, -3, -2, 1, 6, 1, -2][n%12+1]*n+[0, 13, -76, 81, 112, 77, -108, -95, 32, 189, 4, -31][n%12+1])/432 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 13 2026
STATUS
approved
