%I #41 Sep 08 2022 08:45:52
%S 0,1,5,18,49,110,216,385,638,999,1495,2156,3015,4108,5474,7155,9196,
%T 11645,14553,17974,21965,26586,31900,37973,44874,52675,61451,71280,
%U 82243,94424,107910,122791,139160,157113,176749,198170,221481,246790,274208,303849
%N a(n) = n*(n-3)*(n^2-7*n+14)/8.
%C Number of points of intersection of diagonals of a general convex n-polygon. (both inside and outside the polygon).
%C n(n-3)/2 (n >= 3) is the number of diagonals of an n-gon (A080956). The number of points (inside or outside), distinct of tops, where these diagonals intersect is : (1/2)( n(n-3)/2)(n(n-3)/2 - 2(n-4) -1) = n(n-3)(n^2 - 7n + 14) / 8.
%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 797.
%H Vincenzo Librandi, <a href="/A176145/b176145.txt">Table of n, a(n) for n = 3..10000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F G.f.: x^4*(1+3*x^2-x^3)/(1-x)^5. [_Colin Barker_, Jan 31 2012]
%F a(n) = 5*a(n-1) -10*a(n-2) +10*a(n-3) -5*a(n-4) + a(n-5), with a(3)= 0, a(4)= 1, a(5)=5, a(6)= 18, a(7) = 49. [_Bobby Milazzo_, Jun 24 2013]
%F a(n) = Sum_{k=(n-3)..(n-2)*(n-3)/2} k. - _J. M. Bergot_, Jan 21 2015
%e For n=3, a(3) = 0 (no diagonals in triangle),
%e For n=4, a(4) = 1 (2 diagonals => 1 point of intersection),
%e For n=5, a(5) = 5 (5 diagonals => 5 points of intersection),
%e For n=6, a(6) = 18 (9 diagonals => 18 points of intersection).
%p for n from 3 to 50 do: x:=n*(n-3)*(n^2 - 7*n +14)/8 : print(x):od:
%t Table[n*(n - 3)*(n^2 - 7*n + 14)/8, {n, 3, 42}] (* _Bobby Milazzo_, Jun 24 2013 *)
%t Drop[CoefficientList[Series[x^4(1+3x^2-x^3)/(1-x)^5,{x,0,50}],x],3] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,1,5,18,49},50] (* _Harvey P. Dale_, Mar 14 2022 *)
%o (Magma) [n*(n-3)*(n^2 - 7*n + 14) / 8: n in [3..60]]; // _Vincenzo Librandi_, May 21 2011
%o (PARI) vector(100,n,(n+2)*(n-1)*(n^2-3*n+4)/8) \\ _Derek Orr_, Jan 21 2015
%Y Cf. A080956, A055504.
%Y Cf. A000217, A034856, A000124, A005581-A005584.
%K nonn,easy
%O 3,3
%A _Michel Lagneau_, Apr 10 2010
%E Edited by _N. J. A. Sloane_, Apr 19 2010
|