TITLE: Bounds on squarefree numbers
QUESTION [15 upvotes]: Let $q_1,q_2,\ldots$ denote the squarefree integers 1, 2, 3, 5, ....  What effective bounds are known for $q_n$?  Clearly
$$q_n\sim\zeta(2)n$$
but I need hard inequalities.  Of course from the above there exist $\varepsilon,N$ with
$$(\zeta(2)-\varepsilon)n < q_n < (\zeta(2)+\varepsilon)n$$
for all $n>N,$ but I do not have proven values for $\varepsilon,N$.  Of course
$$|q_n-\zeta(2)n| < f(n)$$
for sublinear $f$ would be preferable (and should be possible; squarefree numbers are fairly well-behaved).
I'm sure this is in some standard reference but I haven't found it.  Ideas?

For those interested, my actual goal is to find a reasonable bound for the powerful (2-full) numbers for computational purposes.  Their asymptotic growth is tightly constrained but for numerical computations I would prefer worst-case bounds that I can trust rather than a heuristic that says the error probably won't be much more than, say, 10 times the O-term.

REPLY [11 votes]: Result
$$
\zeta(2)n - 0.058377\sqrt n < q_n < \zeta(2)n + 0.058377\sqrt n
$$
for all $n\ge268293.$ For smaller values of $n$ you can use
$$
\zeta(2)n - 36 < q_n < \zeta(2)n + 33
$$
which actually holds for $1 \le n \le 696017.$
Here's a chart of the residuals below 268293. Yellow and gray are the upper and lower bounds for this range (-36 to +33) and hence never cross 0. Red and blue and the upper and lower bounds for larger numbers ($\pm\,0.058377\sqrt n$) which cross 0 several times. There are tick marks on the x-axis every 25,000.

Proof
Let
$$
Q(x):=\sum_{n\le x}\mu(n)^2
$$
be the number of squarefree numbers up to $x.$ Cohen, Dress, & El Marraki [2] (improving on Cohen & Dress 1) prove that
$$
\left|Q(x)-\frac{x}{\zeta(2)}\right| < 0.02767\sqrt x
$$
for $x\ge438653.$ So
$$
\left|Q(\zeta(2)x)-\frac{\zeta(2)x}{\zeta(2)}\right| < 0.02767\sqrt{\zeta(2)x} < 0.0354882\sqrt x
$$
for $x\ge266079.$ We want $Q(x) \ge n$ so we need a slightly larger argument. Choosing $\zeta(2)n + k\sqrt n$ (where $k$ is to be chosen later) we get
$$
Q\left(\zeta(2)n + k\sqrt n\right) > n + \sqrt n\left(\frac{k}{\zeta(2)} - 0.02767\sqrt{\zeta(2) + k/\sqrt n}\right)
$$
and so the goal is to choose a small $k$ such that
$$
\frac{k}{\zeta(2)} \ge 0.02767\sqrt{\zeta(2) + k/\sqrt N}
$$
for all $N\ge n$, which happens just when
$$
k \ge \frac{c}{2\sqrt n}\left(c\zeta(2)^2+\zeta(2)^2\sqrt{4n/\zeta(2)+c^2}\right)
$$
(with $c=0.02767$ for brevity). Choosing $n=10^6$ shows that $k=0.058377$ is admissible; substituting this value gives
$$
Q\left(\zeta(2)n + 0.058377\sqrt n\right) > n + \sqrt n\left(\frac{0.058377}{\zeta(2)} - 0.02767\sqrt{\zeta(2) + 0.058377/\sqrt n}\right) > n
$$
as desired. Checking up to that bound reveals that this works for all $n\ge268293.$ Similar calculations in the other direction complete the proof; in that direction only $n\ge217502$ is needed.

1 H. Cohen and F. Dress, Estimations numériques du reste de la fonction sommatoire relative aux entiers sans facteur carré, Colloque de théorie analytique des nombres "Jean Coquet": proceedings journées SMF-CNRS, CIRM, Marseille (Septembre 1985), pp. 73–76.
[2] Henri Cohen, Francois Dress, and Mohamed El Marraki, Explicit estimates for summatory functions linked to the Möbius μ-function, Functiones et Approximatio Commentarii Mathematici 37 (2007), part 1, pp. 51–63.