What is the probability that a randomly selected positive integer between 1 and 100 (inclusive) is square-free? What is the probability that a randomly selected positive integer between $1$ and $100$ (inclusive) is square-free (i.e., has no square factor; for instance $15 = 3 \cdot 5$ is square-free, but $90$ is not, since it has a factor of $3^2$).
I have no idea how to solve this problem. Any help on how to proceed?
 A: I recommend a variant of the Sieve of Eratosthenes. Instead of crossing off the prime numbers, cross of the perfect squares and their multiples. Count the numbers that you don't cross off to get the square free numbers.
A: First count the numbers which are not squarefree.  An integer $n$ is not squarefree if it is a multiple of $4$ or $9$ or $16$ or $25$ or... or $100$, and as you are only interested in numbers up to $100$ we can stop there.  However, multiples of $16$ can be ignored as they will already have been counted as multiples of $4$, and so on.
So what it comes down to is that we need to eliminate numbers which are multiples of $4$, $9$, $25$, or $49$.  We still have to be careful as for example $36$ is a multiple both of $4$ and of $9$ and we mustn't exclude it twice.  The best thing to do is to use the inclusion/exclusion formula.
Let $S_4$ be the set of numbers from $1$ to $100$ which are multiples of $4$, and so on.  The number of integers we don't want is
$$\eqalign{|S_4\cup S_9\cup S_{25}\cup S_{49}|
  &=|S_4|+|S_9|+|S_{25}|+|S_{49}|\cr
  &\qquad{}-|S_4\cap S_9|-\cdots\cr
  &\qquad{}+|S_4\cap S_9\cap S_{16}|+\cdots\cr
  &\qquad{}-|S_4\cap S_9\cap S_{16}\cap S_{25}|\ .\cr}$$
There are "in principle" a lot of terms to work out here, but if you think carefully you will see that many of them are zero.  See if you can take it from here.
Comment.  For an interesting extension of the problem, see here, equation (8).
A: A number that is not squarefree is a multiple of a $p^2$ for some $p$ prime.  The values of $p^2$ that are small enough to divide a number between $1$ and $100$ are $4, 9, 25, 49$.
So, the question becomes: how many numbers from $1$ to $100$ are not multiples of $4$ or $9$ or $25$ or $49$?
Count how many there are of each, and make sure you take into account numbers like $36$, which is both a multiple of $4$ and a multiple of $9$.
