Problem:
For each integer nβ₯2, let A(n) be the area of the region in the coordinate plane defined by the inequalities 1β€x<n and 0β€yβ€xβxββ, where βxββ is the greatest integer not exceeding xβ. Find the number of values of n with 2β€nβ€1000 for which A(n) is an integer.
Solution:
For positive integer k, if 1β€k2β€x<(k+1)2, then xβxββ=kx. The inequalities nβ€x<n+1 and 0β€yβ€xβxββ define a trapezoid with height 1 and average of the bases 2(2n+1)kβ. The area of this trapezoid, which is A(n+ 1) βA(n), is an integer if k is even and a half-integer if k is odd. Hence for even values of k,A(n+1) is an integer if and only if A(n) is an integer, and for odd values of k,A(n+1) is an integer if and only if A(n) is not an integer.
For kβ₯1, let Ikβ be the set of the 2k+1 integers n such that k2<nβ€(k+1)2. If k is even, the values of A(n) for nβIkβ are either all integers or all non-integers, according to whether A(k2) is or is not an integer. Furthermore, if k is odd, the values of A(n) for nβIkβ alternate between integers and non-integers, beginning with an integer if A(k2) is a non-integer and vice versa. Because A(2) is not an integer, the number of integer values of A(n) for elements of each set Ikβ can be calculated by considering k modulo 4:k=4jβ3,4jβ2,4jβ1,4j.
Because A((4jβ3)2) is an integer, the values of A(n) for nβI4jβ3β alternate between integers and non-integers, beginning and ending with a non-integer. Thus there are 4jβ3 integer values of A(n) for nβI4jβ3β.
Because A((4jβ2)2) is not an integer, there are no integer values of A(n) for nβI4jβ2β.
Because A((4jβ1)2) is not an integer, the values of A(n) for nβI4jβ1β alternate between integers and non-integers, beginning and ending with an integer. Thus there are 4j integer values of A(n) for nβI4jβ1β.
Because A((4j)2) is an integer, all 8j+1 values of A(n) for nβI4jβ are integers.
Thus for jβ₯1, there are 16jβ2 integer values of A(n) for (4jβ3)2<nβ€(4j+1)2. The number of integer values of A(n) for 2β€nβ€292 is
j=1β7β(16jβ2)=16(27β 8β)β7β 2=434
There are additionally 29 integer values of A(n) for 292<nβ€302, none for 302<nβ€312, and 20 for 312<nβ€1000, for a total of 434+29+20=483β integer values of A(n).