OFFSET
0,7
LINKS
FORMULA
a(n) = Sum_{m=1..floor(n/6)} Sum_{l=m..floor((n-m)/5)} Sum_{k=l..floor((n-l-m)/4)} Sum_{j=k..floor((n-k-l-m)/3)} Sum_{i=j..floor((n-j-k-l-m)/2)} ((i mod 2) + (j mod 2) + (k mod 2) + (l mod 2) + (m mod 2) + ((n-i-j-k-l-m) mod 2)).
EXAMPLE
a(9) = 13 because the 3 possible partitions into 6 parts, 1+1+1+1+1+4, 1+1+1+1+2+3, and 1+1+1+2+2+2 contain in total 13 odd numbers.
MATHEMATICA
Table[Sum[Sum[Sum[Sum[Sum[Mod[i, 2] + Mod[j, 2] + Mod[k, 2] + Mod[l, 2] + Mod[m, 2] + Mod[n - i - j - k - l - m, 2], {i, j, Floor[(n - j - k - l - m)/2]}], {j, k, Floor[(n - k - l - m)/3]}], {k, l, Floor[(n - l - m)/4]}], {l, m, Floor[(n - m)/5]}], {m, Floor[n/6]}], {n, 0, 50}]
Table[Count[Flatten[IntegerPartitions[n, {6}]], _?(OddQ[#]&)], {n, 0, 50}] (* Harvey P. Dale, Aug 20 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Aug 07 2019
STATUS
approved