# Question about primes in square-free numbers

For any prime, what percentage of the square-free numbers has that prime as a prime factor?

-
There are infinitely many square-free numbers; what do you mean by a percentage of an infinite set? – Brian M. Scott Apr 7 '12 at 22:44
On the number line we know that 2 divides half, 3 divides one third, etc. If I pick a prime, what part of the square-free numbers would have it as a factor? – Fred Kline Apr 7 '12 at 22:55
@BrianM.Scott : I would assume that what is meant is a density $\lim\limits_{n\to\infty} |A\cap B\cap\{1,\ldots,n\}|/|B\cap\{1,\ldots,n\}|$, where $A$ is the set of all square-free numbers having the particular prime as a factor and $B$ is the set of all square-free numbers. – Michael Hardy Apr 7 '12 at 22:57
@Michael: So would I, but I wanted it explicitly confirmed. – Brian M. Scott Apr 7 '12 at 22:58
@RudyToody: Yeah; sorry, but what you have does not prove what you think you prove. Your "counts" don't count density, don't count limiting quantity. In the end, you are just taking an infinite set and dividing it into two sets that can be bijected. This is trivial, and proves nothing. – Arturo Magidin Apr 8 '12 at 13:57

Let $A(n)=\{\mathrm{squarefree~numbers~\le n}\}$ and $B_p(n)=\{x\in A(n); p\mid x\}$.
Then the asymptotic density of $B_p$ in $A$ is $b_p = \lim_{n\rightarrow \infty} |B_p(n)|/|A(n)|$. (It seems from the comments that this is not what @RudyToody is looking for, but I thought it's worth writing up anyway.) Let the density of $A$ in $\mathbb{N}$ be $a = \lim_{n\rightarrow \infty} |A|/n$.
Observe $B_p(pn) = \{px; x\in A(n),p\nmid x\}$, so for $N$ large $b_p$ must satisfy \begin{align} b_p a (pN) & \simeq (1-b_p)aN \\ b_p &= \frac{1}{p+1} \end{align} as @joriki already noted.
To illustrate, here are some counts for squarefree numbers $<10^7$. $|A(10^7)|=6079291$. $$\begin{array}{c|c|c|c} p & |B_p(10^7)| & |A(10^7)|/(p+1) & \Delta=(p+1)|B|/|A|-1 \\ \hline \\ 2 & 2026416 & 2026430.3 & -7\times 10^{-6} \\ 3 & 1519813 & 1519822.8 & -6\times 10^{-6} \\ 5 & 1013234 & 1013215.2 & 1.9\times 10^{-5} \\ 7 & 759911 & 759911.4 & -5\times 10^{-7} \\ 71 & 84438 & 84434.6 & 4\times 10^{-5} \\ 173 & 34938 & 34938.5 & -1.3 \times 10^{-5} \end{array}$$