OFFSET
3,1
COMMENTS
The number of diagonals for a convex polygon with n sides is n*(n-3)/2.
For a triangle and a quadrilateral, the number of sides is greater than the number of diagonals. For a pentagon, the number of sides is equal to the number of diagonals. For an hexagon or a polygon with more than six sides, the number of diagonals is greater than the number of sides.
LINKS
G. C. Greubel, Table of n, a(n) for n = 3..1000
Ask Dr. Math, Polygon diagonals
Eric Weisstein's World of Mathematics, Polygon
Eric Weisstein's World of Mathematics, Polygon diagonal
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = n*(n - 5)/2.
a(n) = binomial(n-2, 2) - 3. - Yuchun Ji, Aug 12 2021
From G. C. Greubel, Jul 31 2022: (Start)
G.f.: (-1)*x^3*(3 - 7*x + 3*x^2)/(1-x)^3.
E.g.f.: (x/2)*( (x-4)*exp(x) + 4 + 3*x ). (End)
MATHEMATICA
Table[(n(n-5))/2, {n, 3, 80}] (* Harvey P. Dale, Jan 23 2021 *)
PROG
(Magma) [n*(n-5)/2: n in [3..80]]; // G. C. Greubel, Jul 31 2022
(Sage) [n*(n-5)/2 for n in (3..80)] # G. C. Greubel, Jul 31 2022
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Bernard Schott, Apr 21 2019
STATUS
approved