

A273724


Place n equallyspaced points around a circle, labeled 0,1,2,...,n1. For each i = 0..n1 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.


4



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, 26, 25, 28, 28, 30, 27, 32, 32, 34, 33, 36, 36, 38, 35, 40, 40, 42, 41, 44, 44, 46, 43, 48, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


LINKS

Brooke Logan and N. J. A. Sloane, Table of n, a(n) for n = 0..10000
Kival Ngaokrajang, Illustration of initial terms
Burkard Polster, Times Tables, Mandelbrot and the Heart of Mathematics, Mathologer video (2015).


FORMULA

a(n) = n1 if n>0 is odd, n2 if n == +2 (mod 8), n3 if n == 4 (mod 8), and n5 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/(1x)^2(4+x^2+2*x^4+x^6)/(1x^8), which can be rewritten as (5*x^63*x^5+2*x^4+3*x^2x+2)*x^3/((1x)*(1x^8)). (This g.f. was conjectured by Colin Barker.)  Brooke Logan and N. J. A. Sloane, Jun 23 2016
a(n) = a(n1)+a(n8)a(n9) for n>9.  Colin Barker, May 29 2016 (This follows from the above g.f.  Brooke Logan and N. J. A. Sloane)


PROG

(Small Basic)
For n=0 to 200
For i = 0 To n1
x[i]=0
a=i*3
b=an
c=a2*n
If b<0 And c<0 Then
x[i]=a
EndIf
If b>0 And c<0 Then
x[i]=b
EndIf
If b>0 And c>0 Then
x[i]=c
EndIf
EndFor
c=0
For j = 0 To n1
For k=0 To j
If x[j]=k And x[k]=j Then
c=c+1
EndIf
EndFor
EndFor
aa=nc
TextWindow.Write(aa+", ")
Endfor


CROSSREFS

Cf. A117571 (if 3i is changed to 2i), A274462 (if 3i is changed to 4i).
Sequence in context: A326147 A351168 A196082 * A108755 A093049 A326146
Adjacent sequences: A273721 A273722 A273723 * A273725 A273726 A273727


KEYWORD

nonn


AUTHOR

Kival Ngaokrajang, May 28 2016


EXTENSIONS

Definition edited by N. J. A. Sloane, Jun 23 2016


STATUS

approved



