Quite some time ago, I made a function $f(x)$ which I thought would give me the minimum amount of prime twins equal to or lower than $x$. I have tested this function for large values of $x$ and it seems to work perfectly fine. But I think the function is just too simple to be true. Please note that I have thought about this for more than 2 months before posting, I didn't just come up with it and post it immediately.
We know that if a natural number $n$ is not divisible by any of the primes lower than or equal to $\sqrt{n}$, that $n$ is a prime (except for $n=1$).
If $x\leq9$, then that would mean that: $$f(x)>\lfloor (x-2)*\dfrac{1}{2}\rfloor-1$$ Since the number inbetween the twin prime has to be even and $1,3$ are no twin primes.
If $9<x\leq25$, then the number inbetween the twin primes has to be a multiple of $6$ and we get: $$f(x)>\lfloor(x-3)*\dfrac{1}{6}\rfloor-1$$
When $25<x\leq 49$ it get's a bit more complicated. Numbers inbetween twin primes are either $30n$ ,$30n+2$, $30n+12$, $30n+18$ or $30n+3$. We get: $$f(x)>\lfloor(x-5)*\dfrac{3}{30}\rfloor-1$$ We can generalize the function as follows: $$f(x)>\lfloor\dfrac{x-p_{\pi(\sqrt{x})}}{2}*\prod_{k=2}^{\pi(\sqrt{x})}\dfrac{p_k-2}{p_k}\rfloor-1$$ Where $f(x)$ is the amount of twin primes lower than or equal to $x$.
I've posted (and deleted) something like this a while ago, somebody said there that "We've all seen these please stop". The thing is, I still don't know why it wouldn't work, so can somebody please tell me?