OFFSET
0,8
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-2,-1,2,1,-1,0,2,-2,-4,2,4,2,-4,-2,2,0,-1,1,2,-1,-2,-1,2,1,-1).
FORMULA
a(n) = Sum_{l=1..floor(n/5)} Sum_{k=l..floor((n-l)/4)} Sum_{j=k..floor((n-k-l)/3)} Sum_{i=j..floor((n-j-k-l)/2)} l * (l mod 2).
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - 2*a(n-4) - a(n-5) + 2*a(n-6) + a(n-7) - a(n-8) + 2*a(n-10) - 2*a(n-11) - 4*a(n-12) + 2*a(n-13) + 4*a(n-14) + 2*a(n-15) - 4*a(n-16) - 2*a(n-17) + 2*a(n-18) - a(n-20) + a(n-21) + 2*a(n-22) - a(n-23) - 2*a(n-24) - a(n-25) + 2*a(n-26) + a(n-27) - a(n-28) for n > 27.
EXAMPLE
Figure 1: The partitions of n into 5 parts for n = 5, 6, ...
1+1+1+1+5
1+1+1+2+4
1+1+1+1+4 1+1+1+3+3
1+1+1+1+3 1+1+1+2+3 1+1+2+2+3
1+1+1+1+1 1+1+1+1+2 1+1+1+2+2 1+1+2+2+2 1+2+2+2+2
-----------------------------------------------------------------------
n | 5 6 7 8 9 ...
-----------------------------------------------------------------------
a(n) | 1 1 2 3 5 ...
-----------------------------------------------------------------------
MATHEMATICA
LinearRecurrence[{1, 2, -1, -2, -1, 2, 1, -1, 0, 2, -2, -4, 2, 4,
2, -4, -2, 2, 0, -1, 1, 2, -1, -2, -1, 2, 1, -1}, {0, 0, 0, 0, 0, 1,
1, 2, 3, 5, 6, 9, 11, 15, 18, 26, 30, 40, 48, 62, 72, 91, 105, 129,
148, 182, 206, 248}, 50]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Aug 19 2019
STATUS
approved