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