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 A135565 #19 Feb 16 2025 08:33:07 %S A135565 0,1,3,8,20,42,91,136,288,390,715,756,1508,1722,2835,3088,4896,4320, %T A135565 7923,8360,12180,12782,17963,16344,25600,26494,35451,36456,47908, %U A135565 38310,63395,64800,82368,84082,105315,99972,132756,135014,165243,167720 %N A135565 Number of line segments in regular n-gon with all diagonals drawn. %C A135565 A line segment (or edge) is considered to end at any vertex where two or more chords meet. %C A135565 I.e., edge count of the n-polygon diagonal intersection graph. - _Eric W. Weisstein_, Mar 08 2018 %H A135565 David W. Wilson, <a href="/A135565/b135565.txt">Table of n, a(n) for n = 1..1000</a> %H A135565 N. J. A. Sloane (in collaboration with Scott R. Shannon), <a href="/A331452/a331452.pdf">Art and Sequences</a>, Slides of guest lecture in Math 640, Rutgers Univ., Feb 8, 2020. Mentions this sequence. %H A135565 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/EdgeCount.html">Edge Count</a> %H A135565 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PolygonDiagonalIntersectionGraph.html">Polygon Diagonal Intersection Graph</a> %H A135565 <a href="/index/Pol#Poonen">Sequences formed by drawing all diagonals in regular polygon</a> %F A135565 a(n) = A007569(n) + A007678(n) - 1. - _Max Alekseyev_ %t A135565 del[m_, n_] := Boole[Mod[n, m] == 0]; %t A135565 A007569[n_] := %t A135565 If[n < 4, n, %t A135565 n + Binomial[n, 4] + del[2, n] (-5 n^3 + 45 n^2 - 70 n + 24)/24 - %t A135565 del[4, n] (3 n/2) + del[6, n] (-45 n^2 + 262 n)/6 + %t A135565 del[12, n]*42 n + del[18, n]*60 n + del[24, n]*35 n - %t A135565 del[30, n]*38 n - del[42, n]*82 n - del[60, n]*330 n - %t A135565 del[84, n]*144 n - del[90, n]*96 n - del[120, n]*144 n - %t A135565 del[210, n]*96 n]; %t A135565 A007678[n_] := %t A135565 If[n < 3, %t A135565 0, (n^4 - 6 n^3 + 23 n^2 - 42 n + 24)/24 + %t A135565 del[2, n] (-5 n^3 + 42 n^2 - 40 n - 48)/48 - del[4, n] (3 n/4) + %t A135565 del[6, n] (-53 n^2 + 310 n)/12 + del[12, n] (49 n/2) + %t A135565 del[18, n]*32 n + del[24, n]*19 n - del[30, n]*36 n - %t A135565 del[42, n]*50 n - del[60, n]*190 n - del[84, n]*78 n - %t A135565 del[90, n]*48 n - del[120, n]*78 n - del[210, n]*48 n]; %t A135565 a[n_] := A007569[n] + A007678[n] - 1; %t A135565 Array[a, 40] (* _Jean-François Alcover_, Sep 07 2017, after _Max Alekseyev_, using _T. D. Noe_'s code for A007569 and A007678 *) %Y A135565 Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file. %K A135565 easy,nice,nonn %O A135565 1,3 %A A135565 _Franklin T. Adams-Watters_, Feb 23 2008