OFFSET
1,4
COMMENTS
For n < 4, no n-gon has a diagonal and thus a(n)=0.
LINKS
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = 3*binomial(n+1, 4) - n = (n-2)*(n-1)*n*(n+1)/8 - n for n>=3; a(1) = a(2) = 0.
From Colin Barker, Aug 19 2020: (Start)
G.f.: x^4*(11 - 15*x + 9*x^2 - 2*x^3) / (1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>7.
(End)
E.g.f.: x + x^2 + exp(x)*x*(-8 + 4*x^2 + x^3)/8. - Stefano Spezia, Aug 19 2020
EXAMPLE
The diagonals of 4-gon would be numbered (1,3) and (2,4). So a(4) = 1*3 + 2*4 = 11.
The diagonals of 5-gon would be numbered (1,3), (1,4), (2,4), (2,5) and (3,5). So a(5) = 1*3 + 1*4 + 2*4 + 2*5 + 3*5 = 40.
PROG
(PARI) concat([0, 0, 0], Vec(x^4*(11 - 15*x + 9*x^2 - 2*x^3) / (1 - x)^5 + O(x^40))) \\ Colin Barker, Aug 19 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohammed Yaseen, Aug 17 2020
STATUS
approved