A weird function related to the denominators of rational squares Between any consecutive integers $a$ and $a+1$ there are infinitely many rational squares of the form $t^2 / s^2$. I have been working to understand the following question: How small can $t$ and $s$ be? That is, let $\sigma (a)$ denote the least natural number $s$ for which there exists a natural number $t$ such that $(s^2)a < t^2 < (s^2)(a + 1)$. What are the properties of the function $\sigma (a)$?
It's not hard to calculate $\sigma (a)$ numerically, and the graph of the function is weird.  Full of crazy fluctuations but bounded by a smooth curve both above and below.  I've been working on this for a while now and have found some nice partial results, including sharp formulas for the lower and upper bounds, a criterion for when the upper bound is attained, and several special cases. (I'll be happy to share those with anybody who asks.)  I am at the point where I think I need to find out if anybody else has worked on this sort of thing before. Standard websearches haven't turned anything up. Does anybody know if this question has been previously investigated?
 A: I found this on the OEIS, but it doesn't list much information, so I don't know whether it's been studied before.  One way to look at it is that you're looking for the rational number with the smallest denominator between $\sqrt{n}$ and $\sqrt{n+1}$.  There are algorithms that use continued fractions to calculate the "best" rational in any given interval; see here.  Square roots have particularly nice continued-fraction representations, so you might even be able to get some sort of formula for $\sigma$.
A: I think pulling the parts of the range of the square function back to an 
interval decorated with Farey fractions will help not only with sigma, but
also with the question with chi corresponding to the cube or other
monotonic polynomial on the positive integers in place of sigma.
Sigma is nice to study because there are about (k^2)/3 Farey fractions
with denominator at most k, almost ensuring a bound of k for sigma(a)
when k^2< a < (k+1)^2.  I'll leave a similar bound for higher orders for you
to derive.
Even just looking at (k +/- 1/t)^2 for positive integers t helps one understand
the behavior of sigma near sigma(k^2); a similar idea was what motivated my
comments below.
I do not know where your function has been studied, but I see connections
to Farey fractions, rational approximation, and even discrete dynamical systems.
Perhaps some of those areas, combined with a suggestion from elsewhwere,
will give you what you seek.
Gerhard "Ask Me About System Design" Paseman, 2012.10.12
