cp's OEIS Frontend

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.

A367204 Number of diagonals in a regular n-gon that are parallel to an edge.

This page as a plain text file.
%I A367204 #41 Dec 06 2024 07:01:05
%S A367204 0,0,5,3,14,8,27,15,44,24,65,35,90,48,119,63,152,80,189,99,230,120,
%T A367204 275,143,324,168,377,195,434,224,495,255,560,288,629,323,702,360,779,
%U A367204 399,860,440,945,483,1034,528,1127,575,1224,624,1325,675,1430,728,1539,783
%N A367204 Number of diagonals in a regular n-gon that are parallel to an edge.
%C A367204 A diagonal is parallel to an edge if and only if, on at least one side of the diagonal, there is an odd number of edges.
%C A367204 If n is odd, all of the diagonals of the n-gon are parallel to an edge.
%H A367204 Paolo Xausa, <a href="/A367204/b367204.txt">Table of n, a(n) for n = 3..10000</a>
%H A367204 Thomas Andrews, <a href="https://math.stackexchange.com/q/793833">Number of Parallel/Not Parallel Diagonals of a Regular Polygon</a>, Mathematics Stack Exchange, 2014.
%H A367204 Paolo Xausa, <a href="/A367204/a367204_1.pdf">Illustration of first terms</a>.
%H A367204 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F A367204 a(n) = n(n-3)/2 = A000096(n-3) if n is odd;
%F A367204 a(n) = n(n-4)/4 = A005563((n-4)/2) = A000096(n-3) - A002378(n/2-1) if n is even.
%F A367204 Sum_{n>=5} 1/a(n) = 59/36 - 2*log(2)/3. - _Amiram Eldar_, Dec 06 2024
%t A367204 LinearRecurrence[{0,3,0,-3,0,1},{0,0,5,3,14,8},100] (* or *)
%t A367204 A367204[n_]:=If[OddQ[n],n(n-3)/2,n(n-4)/4];Array[A367204,100,3]
%o A367204 (Python)
%o A367204 def A367204(n): return n*(n-3)>>1 if n&1 else n*(n-4)>>2 # _Chai Wah Wu_, Nov 22 2023
%Y A367204 Even-indexed terms of A000096 interleaved with A005563.
%Y A367204 Cf. A002378, A211379.
%K A367204 nonn,easy
%O A367204 3,3
%A A367204 _Paolo Xausa_, Nov 10 2023