cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337130 a(n) is the sum of all products of pairs of numbers joined by the diagonals of an n-gon when its vertices are numbered from 1 to n in order.

Original entry on oeis.org

0, 0, 0, 11, 40, 99, 203, 370, 621, 980, 1474, 2133, 2990, 4081, 5445, 7124, 9163, 11610, 14516, 17935, 21924, 26543, 31855, 37926, 44825, 52624, 61398, 71225, 82186, 94365, 107849, 122728, 139095, 157046, 176680, 198099, 221408, 246715, 274131, 303770
Offset: 1

Views

Author

Mohammed Yaseen, Aug 17 2020

Keywords

Comments

For n < 4, no n-gon has a diagonal and thus a(n)=0.

Examples

			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.
		

Crossrefs

Partial sums of A117560. Cf. A000914 (products including sides), A007569, A007678.

Programs

  • 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

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.
a(n) = A000914(n-1) - A006527(n).
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