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.
%I A363174 #37 Nov 26 2024 08:42:04 %S A363174 1,0,0,0,4,4,0,0,10,20,5,0,20,60,30,0,35,140,105,7,56,280,280,16,84, %T A363174 504,630,84,120,840,1260,180,165,1320,2310,462,220,1980,3960,796,286, %U A363174 2860,6435,1716,364,4004,10010,2856,455,5460,15015,5005,560,7280,21840,7744 %N A363174 Array read by rows: T(n,k) is the number of triangles inside a regular n-gon formed by intersecting line segments, considering all configurations of 3 line segments from k distinct vertices, with n >= 3, 3 <= k <= 6. %C A363174 See Sommars and Sommars (1998) for a complete analysis of the problem. %H A363174 Paolo Xausa, <a href="/A363174/b363174.txt">Table of n, a(n) for n = 3..10002</a> (rows 3..2502 of array, flattened). %H A363174 Bjorn Poonen and Michael Rubinstein, <a href="https://arxiv.org/abs/math/9508209">The number of intersection points made by the diagonals of a regular polygon</a>, arXiv:math/9508209 [math.MG], 1995-2006. %H A363174 Steven E. Sommars and Tim Sommars, <a href="https://cs.uwaterloo.ca/journals/JIS/sommars/newtriangle.html">The Number of Triangles Formed by Intersecting Diagonals of a Regular Polygon</a>, Journal of Integer Sequences, Vol. 1 (1998), Article 98.1.5. %H A363174 Paolo Xausa, <a href="/A363174/a363174.pdf">Illustration of T(9,6)</a>. %H A363174 <a href="/index/Pol#Poonen">Sequences formed by drawing all diagonals in regular polygon</a> %F A363174 T(n,3) = binomial(n,3) = A000292(n-2). %F A363174 T(n,4) = 4*binomial(n,4) = A033488(n-3). %F A363174 T(n,5) = 5*binomial(n,5) = A174002(n-4), for n >= 4. %F A363174 T(n,6) = binomial(n,6) = A000579(n) if n is odd, A000579(n) - A260417(n/2) if n is even. %F A363174 Sum_{k=3..6} T(n,k) = A006600(n). %e A363174 Array begins: %e A363174 n\k| 3 4 5 6 %e A363174 ---+--------------------------- %e A363174 3 | 1, 0, 0, 0; %e A363174 4 | 4, 4, 0, 0; %e A363174 5 | 10, 20, 5, 0; %e A363174 6 | 20, 60, 30, 0; %e A363174 7 | 35, 140, 105, 7; %e A363174 8 | 56, 280, 280, 16; %e A363174 9 | 84, 504, 630, 84; %e A363174 10 | 120, 840, 1260, 180; %e A363174 ... %t A363174 A363174list[rowmax_]:=Module[{d},d[m_,n_]:=Boole[Divisible[n,m]];Table[Binomial[n,k]If[4<=k<=5,k,1]-If[k==6&&EvenQ[n],((1/8n^2-9/8n+7/4)d[2,n]+3/4d[4,n]+(6n-106/3)d[6,n]-33d[12,n]-36d[18,n]-24d[24,n]+96d[30,n]+72d[42,n]+264d[60,n]+96d[84,n]+48d[90,n]+96d[120,n]+48d[210,n])n,0],{n,3,rowmax},{k,3,6}]];A363174list[20] %Y A363174 Cf. A000579, A006561, A006600 (row sums), A260417. %Y A363174 Cf. A000292 (column k = 3), A033488 (column k = 4), A174002 (column k = 5), A363173 (column k = 6). %K A363174 nonn,tabf %O A363174 3,5 %A A363174 _Paolo Xausa_, May 19 2023