OFFSET
9,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 9..1000
I. Mezo, Periodicity of the last digits of some combinatorial sequences, arXiv preprint arXiv:1308.1637 [math.CO], 2013 (second formula on page 16 is incorrect).
Index entries for linear recurrences with constant coefficients, signature (14,-85,294,-639,906,-839,490,-164,24).
FORMULA
G.f.: x^9*(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5).
a(n) = (1/3)*(1/16)*(6*n^4 - 12*n^3 - 3*2^n*n^2 + 42*n^2 - 9*2^n*n + 12*n + 8*3^n - 3*2^(n+3) + 24).
a(n) = 3*a(n-1) + C(n-1,2)*(2^(n-4) + 2 - n - C(n-3, 2)), a(n)=0, n < 9. - Vladimir Kruchinin, Oct 04 2018
EXAMPLE
For n=9, label the balls A through I. The box containing ball A can contain 8*7/2 = 28 combinations of other balls. There are 6 balls for the other two boxes, so there are A272352(6) = 10 combinations for those two boxes. Thus, a(9) = 28*10 = 280. - Michael B. Porter, Jul 01 2016
MATHEMATICA
Table[(1/3) (1/16) (6 n^4 - 12 n^3 - 3 2^n n^2 + 42 n^2 - 9 2^n n + 12 n + 8 3^n - 3 2^(n + 3) + 24), {n, 9, 40}]
CoefficientList[Series[(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5), {x, 0, 40}], x] (* Stefano Spezia, Oct 04 2018 *)
PROG
(Magma) [(1/3)*(1/16)*(6*n^4-12*n^3-3*2^n*n^2+42*n^2-9*2^n*n+12*n+8*3^n-3*2^(n+3)+24): n in [9..40]];
(PARI) Vec(x^9*(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5) + O(x^40)) \\ Stefano Spezia, Oct 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, May 12 2016
EXTENSIONS
Data, formulas and programs corrected for erroneous formula in Mezo's paper by Bruno Berselli, May 21 2016
STATUS
approved