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 A211383 #23 Feb 16 2025 08:33:17 %S A211383 0,1,5,13,42,73,189,271,572,661,1365,1569,2790,3057,5117,4555,8664, %T A211383 9041,13797,14213,20930,18625,30525,30967,43092,43513,59189,45871, %U A211383 79422,79713,104445,104619,134960,124921,171717,171533,215514,215081,267197,234319,327660,326569,397845,396337 %N A211383 Number of intersections of diagonals in the interior and exterior of a regular n-gon. %H A211383 Robin Visser, <a href="/A211383/b211383.txt">Table of n, a(n) for n = 3..95</a> %H A211383 Bjorn Poonen and Michael Rubinstein, <a href="http://math.mit.edu/~poonen/papers/ngon.pdf">The Number of Intersection Points Made by the Diagonals of a Regular Polygon</a>, SIAM J. Discrete Mathematics 11 (1998), nr. 1, pp. 135-156; doi: <a href="http://dx.doi.org/10.1137/S0895480195281246">10.1137/S0895480195281246</a>; arXiv: <a href="https://arxiv.org/abs/math/9508209">math/9508209 [math.MG]</a>, 1995-2006. %H A211383 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RegularPolygonDivisionbyDiagonals.html">Regular Polygon Division by Diagonals</a> %F A211383 a(n) = (1/8)*n*(n-3)*(n^2-8*n+19) for n odd. %F A211383 a(n) = A006561(n) + A211382(n). %o A211383 (Sage) %o A211383 def a(n): %o A211383 K = CyclotomicField(n); z = K.gen(); S = set() %o A211383 for i in range(n): %o A211383 for j in range(i+2, n): %o A211383 for k in range(j+1, n): %o A211383 for l in range(k+2, n+j): %o A211383 x = (z^(i-j)-z^(j-i))*(z^l-z^k)-(z^(k-l)-z^(l-k))*(z^j-z^i) %o A211383 y = (z^-j-z^-i)*(z^l-z^k)-(z^-l-z^-k)*(z^j-z^i) %o A211383 if (l!=n+i) and (not y.is_zero()): S.add(x/y) %o A211383 return len(S) # _Robin Visser_, Jul 29 2024 %Y A211383 Cf. A006561, A146212, A211382. %K A211383 nonn %O A211383 3,3 %A A211383 _Martin Renner_, Feb 07 2013 %E A211383 More terms from _Robin Visser_, Jul 29 2024