OFFSET
1,4
COMMENTS
Graphically, the vertices of all squares are defined as the intersection points of the sinusoid y = n * sin(x) and the same sinusoid rotated 90 degrees around the origin.
LINKS
Talmon Silver, Table of n, a(n) for n = 1..100
Nicolay Avilov, Problem 2185. Squares and sinusoid (in Russian).
Nicolay Avilov, Problem Kvadrat v sinuse (in Russian).
Talmon Silver, MUMPS-program
FORMULA
a(n) = (K-1)/4, where K is the number of roots of n*sin(n*sin(x)) + x = 0.
From Merab Leviashvili, Jul 22 2021: (Start)
Writing d=floor(n/(Pi/2)) (mod 4), one has a(n)=
(floor(n/Pi))^2+2*floor(n*sin(n)/(2*Pi)+1/4) if d=0;
(floor(n/Pi+1/2))^2-1-2*floor(n*sin(n)/(2*Pi)+1/4) if d=1;
(floor(n/Pi))^2-1+2*floor(|n*sin(n)/(2*Pi)|+3/4) if d=2;
(floor(n/Pi+1/2))^2-2*floor(|n*sin(n)/(2*Pi)|+3/4) if d=3. (End)
EXAMPLE
a(3) = 0 since there are no squares with all their vertices on the curve y = 3*sin(x).
a(4) = 2 since there are 2 squares whose vertices lie on the curve y = 4*sin(x). The two squares have approximate coordinates: (1.02; 3.39), (3.39; -1.02), (-1.02; -3.39), (-3.39; 1.02) and (1.98; 3.67), (3.67; -1.98), (-1.98; -3.67), (-3.67; 1.98).
CROSSREFS
KEYWORD
nonn
AUTHOR
Nicolay Avilov, Jun 12 2021
EXTENSIONS
More terms from Jinyuan Wang, Jun 17 2021
STATUS
approved