Why exactly are there at most 3 consecutive square-free integers

elementary-number-theory

An integer $x$ is said to be square if it can be written in the form $x=n^2$. I'm trying to find the largest number of consecutive square-free positive integers.
Now I know my approach is wrong but I will state it so my question would be clear.

At first I tried to take the square of the positive integers so we get: $1, 4, 9, 16, 25, 36, 49..$

Then counting the numbers between 1 and 4 , we would get 2 square-free integers. Between 4 and 9 we would have 4 square-free integers. And 6 square-free integers between 9 and 16. So we could assume that there are at least $2n$ square-free integers.
(Note that I assumed that the missing integers between 1 and 4 namely 2 and 3 would be square-free).

However, If you look at this question it seems that a square-free number is number where the primes in its decomposition has only exponents equal to 1 or 0. And you can see the proof followed there.

Does this mean that for example $50=5^2\cdot2$ is a square number? Am I mixing up two completely different definitions? If not, how can for example 8 be a square number?

Best Answer

I'm not sure you explicitly wrote out the original definition you were using, but to be explicit: a "square-free" number $N$ is one which not only is not $x^2$ for some value of $x$, but also does not contain a square number anywhere within its factorization, i.e. for which $\frac{N}{x^2}$ is not an integer for any possible integer choice of $x \gt 1$. As the comments discussed, this means that being "square" and being "square-free" are not opposites - in particular, squares multiplied by other primes, such as $12 = 2^2 \times 3$ are not squares (i.e. are non-square) but are also not square-free.

This is equivalent to the statement about all the exponents being $ \leq 1$. Because multiplication is commutative and associative, we can partially calculate out factors in any given number's prime decomposition (which is unique) in any order we like. In particular, this means that if a prime had any larger exponent, say, $ 27 = 3^3 $, then we can make a square "appear" within the factors by partially multiplying out $ 3 \times 3 \times 3 $ as $ 3 \times ( 3^2 ) = 3 \times 9 $. This in turn means that $\frac{27}{9}$ is an integer (i.e. $3$) and thus $27$ is not square-free.

Also, re: the number of such numbers below a given $n$ (presumably), your comment is about the number of square numbers (not including numbers containing a perfect square), and you can do better by considering that there the largest integer whose square is less than $n$ is $\lfloor \sqrt{n} \rfloor$. There are therefore $n - \sqrt{n}$ non-squares (not non-squarefrees) less than $n$.

There is an approximation for the number of square-free integers less than $n$, but it's significantly more complicated to derive and comes out as $\frac{6n}{\pi^2}$

To answer the specific question in the title, for any group of $4$ consecutive integers, one of them is divisible by $4 = 2^2$ and so isn't square-free. Therefore the largest possible contiguious group is three.