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