OFFSET
0,3
COMMENTS
a(n) is the number of partitions of 8*n+2 into 4 distinct parts <= 4*n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3, -3, 2, -3, 3, -1).
FORMULA
G.f.: x*(5*x^4+9*x^3+12*x^2+5*x+1)/((x^2+x+1)*(x-1)^4).
a(n) = (1/9)*(2*A102283(n) + n*(16*n^2-18*n+9)). - Bruno Berselli, Jan 19 2012
EXAMPLE
a(2) = 8 because there are 8 4-element subsets that can be chosen from {1,2,...,8} having element sum 18: {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}.
MAPLE
a:= n-> ((9+(16*n-18)*n)*n +[0, 2, -2][irem(n, 3)+1])/9:
seq(a(n), n=0..50);
MATHEMATICA
LinearRecurrence[{3, -3, 2, -3, 3, -1}, {0, 1, 8, 33, 86, 177}, 50] (* or *) CoefficientList[Series[(x (1+5 x+12 x^2+9 x^3+5 x^4))/((-1+x)^4 (1+x+x^2)), {x, 0, 50}], x] (* Harvey P. Dale, Feb 25 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jan 16 2012
STATUS
approved