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?

  • 3
    $\begingroup$ Not sure what you are asking. Every fourth integer is divisible by $4$, to answer your first question. As to $50$, well it is neither a square nor is it square free. $\endgroup$ – lulu Sep 22 at 20:03
  • 3
    $\begingroup$ A positive integer $n$ is square-free if it does not have a factor greater than $1$ that is a perfect square. $\endgroup$ – Brian M. Scott Sep 22 at 20:06
  • 1
    $\begingroup$ Square free just means that it is not divisible by any square (other than $1$, of course). As you remark, $50$ is divisible by $5^2$ so $50$ is not square free. Another way to phrase it is that a square free natural number is either $1$ or the product of distinct primes. $\endgroup$ – lulu Sep 22 at 20:17
  • 1
    $\begingroup$ @MathMice That is correct. $\endgroup$ – Mark Sep 22 at 20:26
  • 1
    $\begingroup$ Squarefree integers are $1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, \ldots$ (sequence A005117 in the OEIS). A square free number must be obviously also cube free, 5th power square and so on $\endgroup$ – Raffaele Sep 22 at 21:10

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.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.