login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334087 Draw the lines with equations y=kx (k=1..n) on the R^2/Z^2 square flat torus. a(n) is the number of intersection points. 1
0, 0, 1, 2, 5, 9, 17, 25, 39, 55, 77, 99, 131, 165, 211, 257, 311, 369, 443, 517, 609, 705, 813, 921, 1051, 1185, 1339, 1493, 1665, 1843, 2049, 2255, 2491, 2735, 2999, 3263, 3551, 3845, 4175, 4505, 4859, 5221, 5623, 6025, 6469, 6923, 7401, 7879, 8403, 8935, 9509 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
It appears that the second differences of this sequence yield A326305.
LINKS
PROG
(PARI)
f(i, j, c, d)=my(L=List(), x, y); x=(d-c)/(j-i); if(max(c/i, d/j)<=x&&x<min((c+1)/i, (d+1)/j), y=(d*i-c*j)/(j-i); listinsert(L, [x, y], 1)); L
g(i, j)=my(c, d, L, S=Set()); for(c=0, i-1, for(d=c+1, j-1, L=f(i, j, c, d); S=setunion(S, Set(L)))); S
h(n)=my(i, j, S=Set()); for(i=1, n-1, for(j=i+1, n, S=setunion(S, g(i, j)))); S
a(n)=(n>1)+#h(n)
for(n=0, 60, print1(a(n), ", "))
CROSSREFS
Cf. A326305.
Sequence in context: A123324 A167887 A023603 * A308760 A342854 A062492
KEYWORD
nonn
AUTHOR
Luc Rousseau, Apr 15 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 22 10:14 EDT 2024. Contains 374490 sequences. (Running on oeis4.)