login
a(n) = C(n+2, 2) + C(n+2, 3) + C(n+2, 4) + C(n+2, 5).
6

%I #40 Aug 02 2022 09:13:30

%S 1,4,11,26,56,112,210,372,627,1012,1573,2366,3458,4928,6868,9384,

%T 12597,16644,21679,27874,35420,44528,55430,68380,83655,101556,122409,

%U 146566,174406,206336,242792

%N a(n) = C(n+2, 2) + C(n+2, 3) + C(n+2, 4) + C(n+2, 5).

%C Also, number of 135246-avoiding permutations of n+2 with exactly 1 descent. E.g., there are 57 permutations of 6 with exactly 1 descent. Of these, only the permutation 135246 contains the pattern 135246 so a(4)=56. - _Mike Zabrocki_, Nov 29 2004

%C If Y is a 2-subset of an n-set X then, for n>=5, a(n-5) is the number of 5-subsets of X which do not have exactly one element in common with Y. - _Milan Janjic_, Dec 28 2007

%H G. C. Greubel, <a href="/A027660/b027660.txt">Table of n, a(n) for n = 0..1000</a>

%H Alexsandar Petojevic, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL5/Petojevic/petojevic5.html">The Function vM_m(s; a; z) and Some Well-Known Sequences</a>, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (6,-15,20,-15,6,-1).

%F a(n) = (n+3)*(n+2)*(n+1)*(n^2 - n + 20)/120.

%F G.f.: (1 - 2*x + 2*x^2)/(1-x)^6. - _Mike Zabrocki_, Nov 29 2004

%F a(n) = binomial(n+3,5) + binomial(n+3,3). - _Zerinvary Lajos_, Jul 24 2006, corrected Oct 01 2021

%F a(n) = A000389(n+5) - 2*A000332(n+3). - _R. J. Mathar_, Oct 01 2021

%F From _G. C. Greubel_, Aug 01 2022: (Start)

%F a(n) = Sum_{j=0..3} binomial(n+2, j+2).

%F E.g.f.: (1/120)*(120 +360*x +240*x^2 +80*x^3 +15*x^4 +x^5)*exp(x). (End)

%p a:= n-> (n+3)*(n+2)*(n+1)*(n^2-n+20)/120;

%p seq(a(n), n = 0..60);

%t Sum[Binomial[3+Range[0,60], 2*j+1], {j,2}] (* _G. C. Greubel_, Aug 01 2022 *)

%o (Sage) [binomial(n+3,5) +binomial(n+3,3) for n in range(0, 60)] # _Zerinvary Lajos_, May 17 2009

%o (Magma) [(n^2-n+20)*Binomial(n+3,3)/20: n in [0..60]]; // _G. C. Greubel_, Aug 01 2022

%Y Cf. A000295, A000332, A000389, A051601.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_