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 A211379 #33 Feb 16 2025 08:33:17 %S A211379 0,0,0,3,7,16,27,45,66,96,130,175,225,288,357,441,532,640,756,891, %T A211379 1035,1200,1375,1573,1782,2016,2262,2535,2821,3136,3465,3825,4200, %U A211379 4608,5032,5491,5967,6480,7011,7581,8170,8800,9450,10143,10857,11616,12397,13225 %N A211379 Number of pairs of parallel diagonals in a regular n-gon. %H A211379 Paolo Xausa, <a href="/A211379/b211379.txt">Table of n, a(n) for n = 3..10000</a> %H A211379 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RegularPolygonDivisionbyDiagonals.html">Regular Polygon Division by Diagonals</a>. %H A211379 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1). %F A211379 a(n) = (1/2)*n*(binomial(n/2-1,2) + binomial(n/2-2,2)) = (1/8)*n*(n-4)^2 for n even; %F A211379 a(n) = n*binomial((n-3)/2,2) = (1/8)*n*(n-3)*(n-5) for n odd. %F A211379 G.f.: -x^6*(x^2-x-3) / ((x-1)^4*(x+1)^2). - _Colin Barker_, Feb 14 2013 %e A211379 a(6) = 3 since by numbering the vertices from 1 to 6 there are three pairs of parallel diagonals, i.e., {[1, 3], [4, 6]}, {[1, 5], [2, 4]}, {[2, 6], [3, 5]}. %e A211379 a(7) = 7 since there are the seven pairs {[1, 3], [4, 7]}, {[1, 4], [5, 7]}, {[1, 5], [2, 4]}, {[1, 6], [2, 5]}, {[2, 6], [3, 5]}, {[2, 7], [3, 6]}, {[3, 7], [4, 6]}. %e A211379 a(8) = 16 since there are the sixteen pairs {[1, 3], [4, 8]}, {[1, 3], [5, 7]}, {[1, 4], [5, 8]}, {[1, 5], [2, 4]}, {[1, 5], [6, 8]}, {[1, 6], [2, 5]}, {[1, 7], [2, 6]}, {[1, 7], [3, 5]}, {[2, 4], [6, 8]}, {[2, 6], [3, 5]}, {[2, 7], [3, 6]}, {[2, 8], [3, 7]}, {[2, 8], [4, 6]}, {[3, 7], [4, 6]}, {[3, 8], [4, 7]}, {[4, 8], [5, 7]}. %p A211379 a:=n->piecewise(n mod 2 = 0,1/8*n*(n-4)^2,n mod 2 = 1, 1/8*n*(n-3)*(n-5),0); %t A211379 A211379[n_]:=n/8If[OddQ[n],(n-3)(n-5),(n-4)^2];Array[A211379,100,3] (* or *) %t A211379 LinearRecurrence[{2,1,-4,1,2,-1},{0,0,0,3,7,16},100] (* _Paolo Xausa_, Nov 21 2023 *) %o A211379 (Python) %o A211379 def A211379(n): return n*(n*(n-8)+16-(n&1))>>3 # _Chai Wah Wu_, Nov 22 2023 %Y A211379 Cf. A000096, A367204. %K A211379 nonn,easy %O A211379 3,4 %A A211379 _Martin Renner_, Feb 07 2013