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 A211380 #23 Feb 16 2025 08:33:17 %S A211380 0,1,5,15,42,94,189,340,572,903,1365,1981,2790,3820,5117,6714,8664, %T A211380 11005,13797,17083,20930,25386,30525,36400,43092,50659,59189,68745, %U A211380 79422,91288,104445,118966,134960,152505,171717,192679,215514,240310,267197,296268,327660 %N A211380 Number of pairs of intersecting diagonals in the interior and exterior of a regular n-gon. %H A211380 Eric Weisstein, <a href="https://mathworld.wolfram.com/RegularPolygonDivisionbyDiagonals.html">Regular Polygon Division by Diagonals</a> (MathWorld). %H A211380 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-5,5,1,-3,1). %F A211380 a(n) = 1/8*n*(n^3-11*n^2+43*n-58) for n even; %F A211380 a(n) = 1/8*n*(n-3)*(n^2-8*n+19) for n odd. %F A211380 a(n) = A176145(n) - A211379(n). %F A211380 G.f.: x^4*(2*x^5-3*x^4-7*x^3-x^2-2*x-1) / ((x-1)^5*(x+1)^2). [_Colin Barker_, Feb 14 2013] %p A211380 a:=n->piecewise(n mod 2 = 0,1/8*n*(n^3-11*n^2+43*n-58),n mod 2 = 1,1/8*n*(n-3)*(n^2-8*n+19),0); %t A211380 Drop[CoefficientList[Series[x^4(2x^5-3x^4-7x^3-x^2-2x-1)/((x-1)^5(x+1)^2),{x,0,50}],x],3] (* or *) LinearRecurrence[{3,-1,-5,5,1,-3,1},{0,1,5,15,42,94,189},50] (* _Harvey P. Dale_, Dec 03 2022 *) %o A211380 (Python) %o A211380 def A211380(n): return n*(n*(n*(n-11)+43)-58+(n&1))>>3 # _Chai Wah Wu_, Nov 22 2023 %Y A211380 Cf. A176145, A211379. %K A211380 nonn,easy %O A211380 3,3 %A A211380 _Martin Renner_, Feb 07 2013