# Percentage of natural numbers that are perfect squares?

While reading about the prime number distribution I came across this fact that the percentage of natural numbers that are perfect square is zero. How do I prove this ?

• $$101^2-100^2=10201-10000=201>100$$ So, the possibility goes to $0$. – Takahiro Waki Dec 12 '16 at 18:40
• @TakahiroWaki: this explanation is quite right, but probably a little terse to allow the OP to generalize. – Yves Daoust Dec 13 '16 at 11:29
• By the way, I was aware it does not mean that the limit is always 0. For example, by exchange natural sequence, $a_n=n^2$ are always square, so it's 100 percent. – Takahiro Waki Dec 18 '16 at 17:08

Zero percent of all natural numbers are perfect squares in the sense that the limit of the proportion of the perfect squares to natural numbers is zero.To express it, consider

$$\lim_{x\rightarrow\infty} \frac{\left|\left\{n\in\mathbb{N}\mid n≤x \wedge n\ \mbox{is a perfect square}\right\}\right|}x.$$

Since the numerator is $\lfloor\sqrt{x}\rfloor$, thus approximately $\sqrt x$ and

$$\lim_{x\rightarrow\infty} \frac{\sqrt{x}}x = \lim_{x\rightarrow\infty} \frac{1}{\sqrt{x}} = 0,$$

the statement follows that zero percent of all natural numbers are perfect squares.

"Percentage" is a bad word, you mean something like natural density.

For that it's easy, as the limit exists, you just compute

$$\lim_{n\to\infty} {\#\{m^2 < n : m\in\Bbb N\}\over n}$$

The numerator is bounded above by $\sqrt{n}$ so we get

$$0\le\lim_{n\to\infty} {\#\{m^2 < n : m\in\Bbb N\}\over n}\le \lim_{n\to\infty} {1\over\sqrt n}=0$$

Let $Q_n = \{ x \in \mathbb N : x=y^2, x \le n \}$. Then $\#Q_n \le \sqrt n$.

Then $\displaystyle\lim_{n\to\infty} \frac{\#Q_n}{n} \le \lim_{n\to\infty}\frac{\sqrt n}{n}=\lim_{n\to\infty}\frac{1}{\sqrt n}=0$.