A077044 Largest coefficient in expansion of (1 + x + x^2 + ... + x^(n-1))^5 = ((1-x^n)/(1-x))^5, i.e., the coefficient of x^floor(5*(n-1)/2) and of x^ceiling(5*(n-1)/2); also number of compositions of floor(5*(n+1)/2) into exactly 5 positive integers each no more than n.
0, 1, 10, 51, 155, 381, 780, 1451, 2460, 3951, 6000, 8801, 12435, 17151, 23030, 30381, 39280, 50101, 62910, 78151, 95875, 116601, 140360, 167751, 198780, 234131, 273780, 318501, 368235, 423851, 485250, 553401, 628160, 710601, 800530
Offset: 0
Examples
a(2)=10 since the compositions of floor(5*(2+1)/2) = 7 into exactly 5 positive integers each no more than 2 are: 1+1+1+2+2, 1+1+2+1+2, 1+1+2+2+1, 1+2+1+1+2, 1+2+1+2+1, 1+2+2+1+1, 2+1+1+1+2, 2+1+1+2+1, 2+1+2+1+1, 2+2+1+1+1.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Index entries for sequences related to compositions
- Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
Programs
-
Magma
[(230*n^4+70*n^2+27-(30*n^2+27)*(-1)^n)/384: n in [0..40]]; // Vincenzo Librandi, Sep 05 2011
-
Mathematica
LinearRecurrence[{2,2,-6,0,6,-2,-2,1},{0,1,10,51,155,381,780,1451},40] (* Harvey P. Dale, Mar 05 2015 *)
-
PARI
a(n)=(230*n^4+70*n^2-30*n^2*(-1)^n)\/384 \\ Charles R Greathouse IV, Sep 25 2012
Formula
a(n) = (230*n^4 + 70*n^2 + 27 - (30*n^2 + 27)*(-1)^n)/384 = A077042(n, 5).
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8).
G.f.: -x*(1 + 8*x + 29*x^2 + 39*x^3 + 29*x^4 + 8*x^5 + x^6) / ( (1+x)^3*(x-1)^5 ). - R. J. Mathar, Sep 04 2011