A367204 Number of diagonals in a regular n-gon that are parallel to an edge.
0, 0, 5, 3, 14, 8, 27, 15, 44, 24, 65, 35, 90, 48, 119, 63, 152, 80, 189, 99, 230, 120, 275, 143, 324, 168, 377, 195, 434, 224, 495, 255, 560, 288, 629, 323, 702, 360, 779, 399, 860, 440, 945, 483, 1034, 528, 1127, 575, 1224, 624, 1325, 675, 1430, 728, 1539, 783
Offset: 3
Links
- Paolo Xausa, Table of n, a(n) for n = 3..10000
- Thomas Andrews, Number of Parallel/Not Parallel Diagonals of a Regular Polygon, Mathematics Stack Exchange, 2014.
- Paolo Xausa, Illustration of first terms.
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
Mathematica
LinearRecurrence[{0,3,0,-3,0,1},{0,0,5,3,14,8},100] (* or *) A367204[n_]:=If[OddQ[n],n(n-3)/2,n(n-4)/4];Array[A367204,100,3]
-
Python
def A367204(n): return n*(n-3)>>1 if n&1 else n*(n-4)>>2 # Chai Wah Wu, Nov 22 2023
Formula
a(n) = n(n-3)/2 = A000096(n-3) if n is odd;
Sum_{n>=5} 1/a(n) = 59/36 - 2*log(2)/3. - Amiram Eldar, Dec 06 2024
Comments