I was studying smooth integers, that is integers that have only small prime factors. Denoting
by $P^+(n)$ the largest prime factor of $n$, we define $\Psi(x,B):=|\{ n \le x:\,P^+(n) \le B\}|$ as being the function that counts the amount of integers smaller than $x$ such that every prime factor is $\le B$. Wikipedia has the following estimate for $\Psi(x,B)$:
$$\Psi(x,B) \sim \frac{1}{\pi(B)!} \prod_{p\le B} \frac{\log x}{\log p}$$
where $\pi(B)$ denotes the number of primes less than or equal to $B$. I tried to plot an example of it, first plotting $\Psi(x, 5)$ for all positive integers $x < 100$, and then plotting the estimate 1/(3!) * (log x)^3 / (log 2 * log 3 * log 5) on the same interval, but the graphs didn't match at all:
So I guess I have made a mistake somewhere, but I have no idea where. Why does the estimate deviate so much from the actual plot?
The ratio between the two gets better for much larger numbers. Here is the ratio between $\Psi(x,5)$ and the approximation as $x$ goes from 10 to about half a million