OFFSET
0,7
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,0,-2,4,-6,6,-6,5,-4,0,4,-5,6,-6,6,-4,2,0,-2,2,-2,2,-2,1).
FORMULA
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} (n-i-j-k) * ((n-i-j-k) mod 2).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-7) + 4*a(n-8) - 6*a(n-9) + 6*a(n-10) - 6*a(n-11) + 5*a(n-12) - 4*a(n-13) + 4*a(n-15) - 5*a(n-16) + 6*a(n-17) - 6*a(n-18) + 6*a(n-19) - 4*a(n-20) + 2*a(n-21) - 2*a(n-23) + 2*a(n-24) - 2*a(n-25) + 2*a(n-26) - 2*a(n-27) + a(n-28) for n > 27.
EXAMPLE
Figure 1: The partitions of n into 4 parts for n = 8, 9, ..
1+1+1+9
1+1+2+8
1+1+3+7
1+1+4+6
1+1+1+8 1+1+5+5
1+1+2+7 1+2+2+7
1+1+1+7 1+1+3+6 1+2+3+6
1+1+2+6 1+1+4+5 1+2+4+5
1+1+3+5 1+2+2+6 1+3+3+5
1+1+1+6 1+1+4+4 1+2+3+5 1+3+4+4
1+1+1+5 1+1+2+5 1+2+2+5 1+2+4+4 2+2+2+6
1+1+2+4 1+1+3+4 1+2+3+4 1+3+3+4 2+2+3+5
1+1+3+3 1+2+2+4 1+3+3+3 2+2+2+5 2+2+4+4
1+2+2+3 1+2+3+3 2+2+2+4 2+2+3+4 2+3+3+4
2+2+2+2 2+2+2+3 2+2+3+3 2+3+3+3 3+3+3+3
--------------------------------------------------------------------------
n | 8 9 10 11 12 ...
--------------------------------------------------------------------------
a(n) | 11 11 23 25 46 ...
--------------------------------------------------------------------------
MATHEMATICA
Table[Sum[Sum[Sum[(n - i - j - k)*Mod[n - i - j - k, 2], {i, j, Floor[(n - j - k)/2]}], {j, k, Floor[(n - k)/3]}], {k, Floor[n/4]}], {n, 0, 50}] (* Wesley Ivan Hurt, or: *)
LinearRecurrence[{2, -2, 2, -2, 2, 0, -2, 4, -6, 6, -6, 5, -4, 0, 4, -5, 6, -6, 6, -4, 2, 0, -2,
2, -2, 2, -2, 1}, {0, 0, 0, 0, 1, 0, 3, 3, 11, 11, 23, 25, 46, 50, 82, 93, 140, 155, 214, 242, 327, 363, 471, 524, 661, 733, 901, 998}, 51] (* Georg Fischer, Nov 07 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Aug 17 2019
STATUS
approved