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 A273724 #35 Jan 11 2019 00:56:17 %S A273724 0,0,0,2,1,4,4,6,3,8,8,10,9,12,12,14,11,16,16,18,17,20,20,22,19,24,24, %T A273724 26,25,28,28,30,27,32,32,34,33,36,36,38,35,40,40,42,41,44,44,46,43,48, %U A273724 48,50,49,52,52,54,51,56,56,58,57,60,60,62,59,64,64,66,65,68,68,70,67,72,72,74,73,76,76,78,75,80,80 %N A273724 Place n equally-spaced points around a circle, labeled 0,1,2,...,n-1. For each i = 0..n-1 such that 3i != i mod n, draw an (undirected) chord from i to (3i mod n). Then a(n) is the total number of distinct chords. %H A273724 Brooke Logan and N. J. A. Sloane, <a href="/A273724/b273724.txt">Table of n, a(n) for n = 0..10000</a> %H A273724 Kival Ngaokrajang, <a href="/A273724/a273724.pdf">Illustration of initial terms</a> %H A273724 Burkard Polster, <a href="https://www.youtube.com/watch?v=qhbuKbxJsk8">Times Tables, Mandelbrot and the Heart of Mathematics</a>, Mathologer video (2015). %F A273724 a(n) = n-1 if n>0 is odd, n-2 if n == +-2 (mod 8), n-3 if n == 4 (mod 8), and n-5 if n == 0 (mod 8). These formulas are easily established by observing that the chord at i is missing if 2i == 0 mod n, and the chords starting at i and at 3i coincide if 8i == 0 mod n. The formulas then imply that the g.f. is 4+x^2/(1-x)^2-(4+x^2+2*x^4+x^6)/(1-x^8), which can be rewritten as (5*x^63*x^5+2*x^4+3*x^2-x+2)*x^3/((1-x)*(1-x^8)). (This g.f. was conjectured by _Colin Barker_.) - _Brooke Logan_ and _N. J. A. Sloane_, Jun 23 2016 %F A273724 a(n) = a(n-1)+a(n-8)-a(n-9) for n>9. - _Colin Barker_, May 29 2016 (This follows from the above g.f. - _Brooke Logan_ and _N. J. A. Sloane_) %o A273724 (Small Basic) %o A273724 For n=0 to 200 %o A273724 For i = 0 To n-1 %o A273724 x[i]=0 %o A273724 a=i*3 %o A273724 b=a-n %o A273724 c=a-2*n %o A273724 If b<0 And c<0 Then %o A273724 x[i]=a %o A273724 EndIf %o A273724 If b>0 And c<0 Then %o A273724 x[i]=b %o A273724 EndIf %o A273724 If b>0 And c>0 Then %o A273724 x[i]=c %o A273724 EndIf %o A273724 EndFor %o A273724 c=0 %o A273724 For j = 0 To n-1 %o A273724 For k=0 To j %o A273724 If x[j]=k And x[k]=j Then %o A273724 c=c+1 %o A273724 EndIf %o A273724 EndFor %o A273724 EndFor %o A273724 aa=n-c %o A273724 TextWindow.Write(aa+", ") %o A273724 Endfor %Y A273724 Cf. A117571 (if 3i is changed to 2i), A274462 (if 3i is changed to 4i). %K A273724 nonn %O A273724 0,4 %A A273724 _Kival Ngaokrajang_, May 28 2016 %E A273724 Definition edited by _N. J. A. Sloane_, Jun 23 2016