OFFSET
6,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 6..1000
I. Mezo, Periodicity of the last digits of some combinatorial sequences, arXiv preprint arXiv:1308.1637 [math.CO], 2013 (page 16).
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
G.f.: x^6*(10 - 15*x + 6*x^2)/((1 - x)^3*(1 - 2*x)).
a(n) = (2^n - 2 - 2*n - 2*binomial(n, 2))/2.
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4), for n > 3.
E.g.f.: (2 - 2*exp(x) + 2*x + x^2)^2/8. - Stefano Spezia, Jul 25 2021
EXAMPLE
For n=6, label the balls A, B, C, D, E, and F. Then each box must contain exactly 3 balls, and the 10 ways are ABC/DEF, ABD/CEF, ABE/CDF, ABF/CDE, ACD/BEF, ACE/BDF, ACF/BDE, ADE/BCF, ADF/BCE, AEF/BCD. - Michael B. Porter, Jul 01 2016
MATHEMATICA
Table[1/2 (2^n - 2 - 2 n - 2 Binomial[n, 2]), {n, 6, 40}]
LinearRecurrence[{5, -9, 7, -2}, {10, 35, 91, 210}, 30] (* Harvey P. Dale, Mar 29 2018 *)
PROG
(Magma) [(2^n-2-2*n-2*Binomial(n, 2))/2: n in [6..50]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, May 11 2016
STATUS
approved