%I M3011 N1219 #80 Jul 09 2023 21:56:33
%S 3,16,51,126,266,504,882,1452,2277,3432,5005,7098,9828,13328,17748,
%T 23256,30039,38304,48279,60214,74382,91080,110630,133380,159705,
%U 190008,224721,264306,309256,360096,417384,481712,553707,634032,723387,822510
%N Coefficient of x^5 in expansion of (1 + x + x^2)^n.
%C If Y is a 3-subset of an n-set X then, for n>=7, a(n-4) is the number of 5-subsets of X having at most one element in common with Y. - _Milan Janjic_, Nov 23 2007
%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A000574/b000574.txt">Table of n, a(n) for n = 3..1000</a>
%H L. Carlitz et al., <a href="http://dx.doi.org/10.1016/S0021-9800(66)80057-1">Permutations and sequences with repetitions by number of increases</a>, J. Combin. Theory, 1 (1966), 350-374.
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TrinomialCoefficient.html">Trinomial Coefficient</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (6,-15,20,-15,6,-1).
%F G.f.: x^3*(3-2*x)/(1-x)^6.
%F a(n) = 3*binomial(n+2,5) - 2*binomial(n+1,5).
%F a(n) = A111808(n,5) for n>4. - _Reinhard Zumkeller_, Aug 17 2005
%F a(n) = binomial(n+1, 4)*(n+12)/5 = 3*b(n-3)-2*b(n-4), with b(n)=binomial(n+5, 5); cf. A000389.
%F a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6). - _Vincenzo Librandi_, Jun 10 2012
%F a(n) = 3*binomial(n, 3) + 4*binomial(n, 4) + binomial(n, 5). - _Vladimir Shevelev_ and _Peter J. C. Moses_, Jun 22 2012
%F a(n) = GegenbauerC(N, -n, -1/2) where N = 5 if 5<n else 2*n-5. - _Peter Luschny_, May 10 2016
%F a(n) = Sum_{i=1..n-1} A000217(i)*A055998(n-1-i). - _Bruno Berselli_, Mar 05 2018
%F E.g.f.: exp(x)*x^3*(60 + 20*x + x^2)/120. - _Stefano Spezia_, Jul 09 2023
%p A000574:=-(-3+2*z)/(z-1)**6; # conjectured by _Simon Plouffe_ in his 1992 dissertation
%p seq(3*binomial(n+2,5)-2*binomial(n+1,5),n=3..100); # _Robert Israel_, Aug 04 2015
%p A000574 := n -> GegenbauerC(`if`(5<n,5,2*n-5), -n, -1/2):
%p seq(simplify(A000574(n)), n=3..20); # _Peter Luschny_, May 10 2016
%t CoefficientList[Series[(3-2*x)/(1-x)^6,{x,0,40}],x] (* _Vincenzo Librandi_, Jun 10 2012 *)
%o (Magma) [3*Binomial(n+2,5)-2*Binomial(n+1,5): n in [3..50]]; // _Vincenzo Librandi_, Jun 10 2012
%o (PARI) x='x+O('x^50); Vec(x^3*(3-2*x)/(1-x)^6) \\ _G. C. Greubel_, Nov 22 2017
%Y Cf. A000389, A005581, A005712, A005714-A005716, A111808.
%Y Column m=5 of (1, 3) Pascal triangle A095660.
%Y Cf. A000217, A055998.
%K nonn,easy
%O 3,1
%A _N. J. A. Sloane_
%E More terms from _Vladeta Jovovic_, Oct 02 2000