4
$\begingroup$

E.g., there are $4$ semiprimes less than or equal to $10$ $(4, 6, 9, 10)$ or $2$ squarefree semiprimes ($6$ and $10$).

It's ok if it's off for small numbers but gets more accurate as $n \to \infty$.

$\endgroup$
6
$\begingroup$

Asymptotically there are about $n\frac{\log\log n}{\log n}$ semiprimes up to $n$, almost all of which are squarefree.

There's also an exact formula if you know all the primes up to the square root of $n$: $$ -{\pi\left(\sqrt{n}\right)\choose 2}+\sum_{p^2\le n} \pi\left(\frac{n}{p}\right) $$ for all semiprimes, or $$ -{\pi\left(\sqrt{n}\right)\choose 2}-\pi\left(\sqrt{n}\right)+\sum_{p^2\le n} \pi\left(\frac{n}{p}\right) $$ for the squarefree semiprimes only.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Where did you find the exact formulas? Also do you happen to know if they can be extended to numbers of the form $n=p_1p_2p_3$ squarefree? $\endgroup$ – AvatarOfChronos Feb 1 '15 at 15:29
  • $\begingroup$ @AvatarOfChronos: I expect they can be so extended, yes -- but the resulting formulas would probably be pretty complex, combinatorially speaking. $\endgroup$ – Charles Feb 2 '15 at 14:32
  • $\begingroup$ Thanks for replying I actually created a separate question about this and later posted a solution to it after some research. It wasn't as clean as these functions but it did the job. $\endgroup$ – AvatarOfChronos Feb 2 '15 at 22:57
3
$\begingroup$

Yes, that can be done.

Redesignate the prime counting function as $p_1(x)$, which counts how many numbers between 0 and $x$ have one prime factor (provided $x$ is a nonnegative real number). Then, given $k \in \mathbb{Z}^+$, we have $$\pi_k(x) \sim \frac{x}{\log x} \frac{(\log \log x)^{k - 1}}{(k - 1)!}.$$ Setting $k = 2$ gives us $$\pi_2(x) \sim \frac{x \log \log x}{\log x}.$$ This comes from Landau's Handbuch der Lehre von der Verteilung der Primzahlen. It is way off at first, it says there are $-2$ semiprimes between 0 and 2.

| cite | improve this answer | |
$\endgroup$

Your Answer

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