Simple question, what is meant by 'as $x \to \infty$ the number of squares $\leq x$ is $\sqrt{x} + O(1)$?

38 Views Asked by At

For $x \to \infty$: the number of squares $n^2 \leq x$ is $\sqrt{x} + O(1)$.

From here (page 6). More specifically, do they mean that... I'm confused now. I'm really not sure what they mean though I just finished a similar problem.

I know that if '$f$ is $O(g)$' then the limit $\limsup_{x\to \infty} \frac{|f(x)|}{g(x)}$ exists.

2

There are 2 best solutions below

2
On BEST ANSWER

Call the number of squares $N(x)$. The statement $N(x)=\sqrt{x}+O(1)$ means $N(x)-\sqrt{x}=O(1)$, which is then defined the way that you know, i.e. that $N(x)-\sqrt{x}$ is bounded above and below as $x \to \infty$.

Alternately, you could say that there exists $f$ such that $N(x)=\sqrt{x}+f(x)$ and $f(x)=O(1)$ as $x \to \infty$. This would be useful if somehow the $O(1)$ term entered into the right side in a complicated way, such that you couldn't isolate it.

0
On

"+O(1)" means "up to addition of a bounded error term".

In this case the error is bounded by $1$. The $\sqrt{x}$ is a real number that is within $1$ of the exact integer answer.